i convert String to Date as:
DateFormat formatter = new SimpleDateFormat("yyyyMMddhhmmss");
String datenow="20120917121823";
Date date2 = (Date) formatter.parse(datenow);
datenow is 12 pm. why after convert it’s “Mon Sep 17 00:18:23 GMT+07:00 2012”
Can you help me? Thanks.
Because hh in hours grabs hours from 1 to 12 you can see the encoding here. You should be using: