1
I have a date that is a return from the database that comes in this format yyyy-mm-dd HH:mm:ss.fff
, how can I turn this into dd-mm-yyyy HH:mm
Example:
My date is like this: 2015-01-16 07:49:45.0
and I want to leave her that way: 16-01-2015 07:49
This solves your problem: http://answall.com/questions/25197/converter-data-dd-mm-aaaa-para-yyy-mm-ddthhmmss. Remembering that "M" (capital letters) should be used for the month.
– Luídne
I’m trying to use the
String formatedDate = DateFormat.format("yyyy-MM-dd hh:mm:ss", receivedDate).toString();
but error in the.format
– DiegoAugusto
What error .format presents ?
– Wellington Avelino
the method format(date) in the type date format is not applicable for the arguments (String, Date)
– DiegoAugusto