How to format a date timestamp for timestamp br. ex.
2015-02-03 15:37:00 para 03/02/2015 15:37:00
obs: date is text
How to format a date timestamp for timestamp br. ex.
2015-02-03 15:37:00 para 03/02/2015 15:37:00
obs: date is text
One of the forms may be as below:
String dataUS = "2015-02-03 15:37:00";
SimpleDateFormat oldFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat newFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
System.out.println(newFormat.format(oldFormat.parse(dataUS)));
That returns:
03/02/2015 15:37:00
See working in IDEONE .