You are mistaken in the way you show the data, which, I think, because for me:
String dateString = "03/26/2012 11:49:00 AM"; SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss aa"); Date convertedDate = new Date(); try { convertedDate = dateFormat.parse(dateString); } catch (ParseException e) {
Print
Mon Mar 26 11:49:00 EEST 2012
Boris Strandjev Mar 30 '12 at 14:40 2012-03-30 14:40
source share