我有一个代码
String date = 05/09/13 10.55 PM;
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy hh.mm a");
Date testDate = null;
testDate = sdf.parse(date);
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss a");
String newFormat = formatter.format(testDate);
System.out.println(".....Date..." + newFormat);
这给了我输出
05/09/13 10:55:00 PM
我真正需要的:
05/09/13 11:55:00 PM //i want to add an hour to the date I got