I have Service
fetch date string from web and then I want to pare it to Date
object. But somehow application crashes.
This is my string that I\'m parsi
Use a SimpleDateFormat
to produce a properly formatted String
output:
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
String formattedNow = simpleDateFormat.format(new Date(System.currentTimeMillis()));
Output : 2018-02-27T07:36:47.686Z