I read a lot of advices on internet and StackOverFlow, but still I'm not understanding why I'm getting this issue on this Date parse. can someone help?
My code:
String date = " Aug 24 18:29:51 2017 GMT ";
System.out.println("@"+date+"@");
DateFormat format = new SimpleDateFormat(" MMM dd HH:mm:ss yyyy z ");
Date data = format.parse(date);
System.out.println("#"+data+"#");
Output:
@ Aug 24 18:29:51 2017 GMT @
java.text.ParseException: Unparseable date: " Aug 24 18:29:51 2017 GMT "
at java.text.DateFormat.parse(DateFormat.java:366)
...
...