发布网友 发布时间:2024-12-20 09:26
共1个回答
热心网友 时间:2024-12-31 09:34
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String time="2006-08-25 10:57:12";
try {
Date date = dateFormat.parse(time);
System.out.println("var = "+ date.toLocaleString());
}
catch (Exception ex) {
System.out.println("Parse String to Time Wrong!!!");
}