📜  从字符串到日期 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:30.963000             🧑  作者: Mango

代码示例3
String dtStart = "2010-10-15T09:27:37Z";  
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");  
try {  
    Date date = format.parse(dtStart);  
    System.out.println(date);  
} catch (ParseException e) {
    e.printStackTrace();  
}