java.text.ParseException: Unparseable date: "Mon Mar 30 00:00:00 CST 2015"

解决方案:


package config;


import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;


public class Test {
public static void main(String[] args) {
String s="Mon Mar 30 00:00:00 CST 2015";

Date f = new Date(s);
try {
String c = new SimpleDateFormat("yyyy-MM-dd").format(f);
System.out.println(c);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
}

你可能感兴趣的:(java.text.ParseException: Unparseable date: "Mon Mar 30 00:00:00 CST 2015")