java.text.ParseException: Unparseable date: \"Sat May 01 00:00:00 EDT 2010\"
I am trying to parse this date using the SimpleDateFormat class.
java.util.
DateFormat formatter = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy"); Date date = (Date)formatter.parse("Sat May 01 00:00:00 EDT 2010"); String string = new String(date.getYear() + "-" + date.getMonth() + "-" + date.getDay());
Should work better then just yyyy-MM-dd.
yyyy-MM-dd