I think this will helps you:
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("M/d/yyyy hh:mm:ss a");
SimpleDateFormat longDateFormat = new SimpleDateFormat("M/d/yyyy HH:mm:ss z");
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
try
{
Date myDate = simpleDateFormat.parse("10/25/2013 02:00:00 PM");
String now = simpleDateFormat.format(myDate.getTime());
System.out.println("12 hour format : " + now);
String time24 = longDateFormat.format(simpleDateFormat.parse(now));
System.out.println("24 hour format : " + time24);
} catch (ParseException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}