62,635
社区成员




try
{
SimpleDateFormat sdf = new SimpleDateFormat("MMM dd yyyy hh:mma",Locale.ENGLISH);
Date d=sdf.parse("Apr 22 2012 01:00PM ");
sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
System.out.println(sdf.format( d ));
sdf = new SimpleDateFormat("yyyy-MM-dd hh:mma");
System.out.println(sdf.format( d ));
}catch (ParseException e) {
e.printStackTrace();
}