【发布时间】:2011-05-24 15:40:49
【问题描述】:
我有以下日期:
2011-05-24T11:40:41Z
如何将其转换为 Joda DateTime?
编辑: 这是我无法编译的代码:
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
Date date = df.parse(aMessage.getString("updated_at"));
org.joda.time.DateTime dt = new DateTime(date);
错误:
The method parse(String) is undefined for the type DateFormat
Type mismatch: cannot convert from SimpleDateFormat to DateFormat
【问题讨论】: