Fully customized datetime
suggest changeDate date = new Date();
df = new SimpleDateFormat("HH:mm", Locale.US);
String localizedDate = df.format(date)
Commonly used patterns:
- HH: hour (0-23)
- hh: hour (1-12)
- a: AM/PM marker
- mm: minute (0-59)
- ss: second
- dd: day in month (1-31)
- MM: month
- yyyy: year
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents