Q:

Date format conversion problem

Am having problem in using simple date format for this: having date as
12/13/2011 12:00:00 AM

For that am using:
SimpleDateFormat form = new SimpleDateFormat("dd/MMMM/yyyy HH:mm:ss");

but throwing an exception while coversion saying:
java.text.ParseException: Unparseable date: 12/13/2011 12:00:00 AM

how to fix this?
Thanks

A:

You are using HH:mm:ss
However, according to the Android Dev Reference, HH is for 24 hour clock.
use h or K or k depending your requirements instead.
Don't forget the am/pm marker as well which is denoted by a

A:

try 
SimpleDateFormat form = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss aa");

instead of 
SimpleDateFormat form = new SimpleDateFormat("dd/MMMM/yyyy HH:mm:ss");

