我想以这种方式将以下字符串转换为日期类型
Date dateToFormat = null;
DateFormat formatter = new SimpleDateFormat("E MMM d HH:mm:ss zzzz yyyy");
String databaseDateAsString = "Wed May 11 16:30:00 Asia/Calcutta 2011";
try {
dateToFormat = formatter.parse(databaseDateAsString);
} catch (Exception e) {
System.out.println("Cannot Parse Date:" + e);
}
但它给出了以下错误: -
Cannot Parse Date:java.text.ParseException: Unparseable date:
"Wed May 11 16:30:00 Asia/Calcutta 2011"
请帮助我如何消除此错误。