I'm retrieving JSON from Azure and receive the date as 1900-01-01T16:00:00.000Z
for example. Now this part of a JSONObject, but how do I correctly parse this into the Java date format?
Thanks for any ideas
I'm retrieving JSON from Azure and receive the date as 1900-01-01T16:00:00.000Z
for example. Now this part of a JSONObject, but how do I correctly parse this into the Java date format?
Thanks for any ideas
Take the date as a String from the Json then parsed it using SimpleDateFormat:
SimpleDateFormat sdf=new SimpleDateFormat("/*Look at the API for the format*/");
Date jsonDate= sdf.parse(/*Date as String from your JSON*/);
To find the correct format you can have a look to this question simpledateformat parsing date with 'Z' literal.