I am developing a simple android app and I need convert a string which contains date and time to date in java, android. Here is an example format of my string:
Sun May 20 18:07:13 EEST 2018
And here is how I try to convert it to date:
SimpleDateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
Date date = formatter.parse("Sun May 20 18:07:13 EEST 2018");
This is the error message I get. Where am I doing wrong??
W/System.err: java.text.ParseException: Unparseable date: "Sun May 20 18:07:13 EEST 2018" (at offset 0)