2017-08-01T05:08:51.000Z
I'm trying to parse the above date string using below code. It says unparseable date at offset 23. I can't seem to figure out the issue.
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
Date date = null;
try {
date = format.parse("2017-08-01T05:08:51.000Z");
} catch (ParseException e) {
e.printStackTrace();
}