I would appreciate any help with finding bug for this exception:
java.text.ParseException: Unparseable date: "2007-09-25T15:40:51.0000000Z"
and following code:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); Date date = sdf.parse(timeValue); long mills = date.getTime(); this.point.time = String.valueOf(mills);
It throws expcetion with Date date = sdf.parse(timeValue); .
Date date = sdf.parse(timeValue);
timeValue = "2007-09-25T15:40:51.0000000Z"; , as in exception.
timeValue = "2007-09-25T15:40:51.0000000Z";
Thanks.
Z represents the timezone character. It needs to be quoted:
Z
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
1.4m articles
1.4m replys
5 comments
57.0k users