日期:2014-05-17 浏览次数:20834 次
String value = "Wed Sep 16 19:02:36 CST 2009";
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss 'CST' yyyy", Locale.US);
Date d = sdf.parse(value);
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println(sdf2.format(d));
String value="Wed Sep 16 19:02:36 CST 2009";
DateFormat df=new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy",Locale.US);
Date date=df.parse(value);
System.out.println(date);