I'm trying to convert a date from String
to a Date
object:
String dateString = "Mon, 04 Sep 2017 18:30:28";
String dateFormat = "EEE, dd MMM yyyy HH:mm:ss";
Results in the following exception:
java.text.ParseException: Unparseable date: "Mon, 04 Sep 2017 18:30:28"
I tried different strings and formats and the problems seems to be the name of week ('EEE'). Without it works perfectly.
Also this works perfectly:
String dateString = "04 Sep 2017 18:30:28, Mon";
String dateFormat = "dd MMM yyyy HH:mm:ss, EEE";