I'm converting date into date and time string. I use following code:
String result = DateUtils.formatDateTime(
getApplicationContext(),
millis,
(DateUtils.FORMAT_SHOW_DATE |
DateUtils.FORMAT_SHOW_TIME |
DateUtils.FORMAT_NUMERIC_DATE));
In result I get 14:17, 20.01.2013. But I want to get 20.01.2013, 14:17. I didn't found any flag to set sequence of date and time.
Is there easy way to convert date into localized string with format "[date], [time]"?
Thanks.
I don't beleive DateUtils can do this. Consider using SimpleDateFormat with the user's Locale or your specific format "dd.MM.yyyy, HH:mm".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With