Hi Folks,
I storing the date to SQLite database in the format
d-MMM-yyyy,HH:mm:ss aaa
And again retrieving it with the same format, the problem now is, I am gettin every thing fine exepth the Hour. Hour I am geting 00 every time, Here the print statement
String date--->29-Apr-2010,13:00:14 PM
After convrting Date--->1272479414000--Thu Apr 29 00:00:14 GMT+05:30 2010
Here is the code:
Date lScheduledDate = CalendarObj.getTime();
DateFormat formatter = new SimpleDateFormat("d-MMM-yyyy,HH:mm:ss aaa");
SomeClassObj.setTime(formatter.format(lScheduledDate));
String lNextDate = SomeClassObj.getTime();
DateFormat lFormatter = new SimpleDateFormat("d-MMM-yyyy,HH:mm:ss aaa");
Date lNextDate = (Date)lFormatter.parse(lNextDate);
System.out.println("output here"+lNextDate);
Please where I am doing wrong.
Cheers, Vinayak