I’m parsing this date format from XML:=> “2011-12-06T07:41:14.016+00:00“, and I’m getting this error:
- W/System.err(574): java.text.ParseException: Unparseable date:
“2011-12-06T07:41:14.016+00:00”
I’m certain it’s the formatting statement I’m using, but I can’t figure out what it SHOULD be…
Here’s the statement I’m using:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss.SSSZ:ss");
I get how to create a format for this part: “2011-12-06T07:41:14….”, it’s this other part :=> “.016+00:00” that’s throwing me for a loop.
I’ve looked for answers here already: Android SimpleDateFormat Page, and here Oracle SimpleDateFormat Page, but I fear I’m missing something fundamental….
Do you have any suggestions on a proper format statement for that particular date format, or pertinent resources to peruse?
Big Thanks in advance!
The “Z” pattern matches +0000 and not +00:00 so if you remove the last “:” before you parse then it will work.