I have a service provide dates and i need process this in mi Android App
In my Node server:
server.send({'date': new Date() });
In my android app:
Date date = new Date(jsonObject.getString('date'));
this throws me a java.lang.IllegalArgumentException error
if a print in the android Log i get 2013-02-21T17:55:27.885Z how to handle this format
Store your Date as a long using
date.getTime()
making your calls look like this:
server.send({'date': new Date().getTime() });
and
Date date = new Date(jsonObject.getString('date'));