I am trying to parse the string "2/20/2012 12:00:00 AM" using SimpleDateFormat , and it seems to be "2/20/2012 12:00:00 AM" out 12 noon. instead of this.
Date fromFmt = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss aa") .parse("2/20/2012 12:00:00 AM");
outputs:
Mon Feb 20 12:00:00 PST 2012 Mon Feb 20 00:00:00 PST 2012
I would expect both of them to get the last one out. Is there something wrong with my format string?
(And please, no one says "use JodaTime".)
source share