Time | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Time

how to chang some thing in code for example string depending on time and date please help?

5th Jun 2018, 12:23 AM
Mohammed Shahbaz
Mohammed Shahbaz - avatar
5 Answers
+ 2
No problem! ;) With Java, you can use the library java.util.Date to actually retrieve the date/time on the user's device. I would recommend checking out this website, as it includes quite a bit of information on how to actually use the library - https://www.tutorialspoint.com/java/java_date_time.htm
5th Jun 2018, 12:47 AM
Faisal
Faisal - avatar
+ 6
Mohammed Shahbaz press the ✅ next to Faisal 's answer.
5th Jun 2018, 1:18 AM
Manual
Manual - avatar
+ 4
I would recommend checking out and learning how to use some of the macros that C++ offers as they can return the time and date based on the device - https://www.sololearn.com/learn/1199/?ref=app
5th Jun 2018, 12:41 AM
Faisal
Faisal - avatar
+ 3
thanx bro Faisal what about java?
5th Jun 2018, 12:44 AM
Mohammed Shahbaz
Mohammed Shahbaz - avatar
+ 3
thanx faisal
5th Jun 2018, 12:48 AM
Mohammed Shahbaz
Mohammed Shahbaz - avatar