日期:2014-05-20 浏览次数:20678 次
Calendar calendar = Calendar.getInstance();
calendar.set(2012, 11, 18, 15, 0, 0);
Date date = calendar.getTime();
System.out.println(date.toLocaleString());
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String dateStr = "2012-12-18 15:00:00";
Date date = formatter.parse(dateStr);