I have a timestamp string
2013-03-01T11:22:18.01Z
generated by strftime("%Y:%m:%dT%H:%M:%SZ")
, which is in Python.
Now I'm trying to use Java's SimpleDateFormat
to parse this timestamp. Lot's of sample code that I found seem to do this:
String DATE_FORMAT = "YYYY-MM-DD'T'hh:mm:ss.ssZ"
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT)
sdf.setLenient(false)
sdf.parse(timestamp) <---- throws ParseException here
However, I get an error dialog that says
Unparseable date: "2013-03-01T11:22:18.01Z"
I've been tweaking DATE_FORMAT
here and there, trying all sorts of things but I've been stuck on the same roadblock for quite a while now. Looks like I'll need to borrow the power of the stackoverflow community on this.