How can I get the current time and date in an Android app?
Get current time and date on Android
De openkb
Sommaire |
Questions
Answers
You could use:
import java.util.Calendar Calendar c = Calendar.getInstance(); int seconds = c.get(Calendar.SECOND);
There are plenty of constants in Calendar for everything you need. http://developer.android.com/reference/java/util/Calendar.html http://developer.android.com/reference/java/util/Calendar.html
Source
License : cc by-sa 3.0
http://stackoverflow.com/questions/5369682/get-current-time-and-date-on-android