I don't really get how to make my date format into this: 2013-09-03T06:19:57.802Z I'm accessing an API that needs my date to be in this format. So when the format is wrong, I'm recieving an internal server error. I've done the following so far.
SimpleDateFormat ISO8601DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US);
Date date = new Date();
String dateToday = ISO8601DATEFORMAT.format(date);
I'm getting this one. 2013-09-03T14:28:11+0800
Any ideas? Thanks!