http://blog.csdn.net/brightleo/article/details/7457004
- public class DateUtil {
- public static String getDateFromISO(String isoDate){
- DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd‘T‘HH:mm:ssZ");
- DateFormat sd=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- try {
- return sd.format(sdf.parse(isoDate));
- } catch (ParseException e) {
- e.printStackTrace();
- return null;
- }
- }
- public static void main(String[] args) {
- System.out.println(DateUtil.getDateFromISO("2014-07-11T14:47:04+0800"));
- }
- }
java 如何得到ISO 8601 时间格式,布布扣,bubuko.com
时间: 2024-12-21 09:21:29