0

2015-03-04T5:06:07.000+0000

I have access to date formats as above, and intend to compare and sort them in ascending order. This is OK when I use a simpler date format in the Playground, but the actual json data bemuses me as I cannot find out what 'T5' refers to, even after looking through the relevant Unicode page.

I had assumed it was a timezone reference, but this would be Z, and I don't think it would be after the day anyway.

1 Answers1

3

"T" is just a separator between the date and time in ISO-8601. It means the strings following it is a Time.

The timezone part is "+0000" i.e. UTC.

So your date format just mean "2015 March 4th, 05:06:07am, at timezone UTC±0".

The letter "Z" means UTC (i.e. Zulu time) and only appears at the end of the string i.e. 2015-03-04T05:06:07.000Z

Community
  • 1
  • 1
kennytm
  • 510,854
  • 105
  • 1,084
  • 1,005
  • Thanks. With your help I could write the dateFormat as yyyy/MM/dd'T'HH:mm:ss.SSS+SSSS –  May 19 '16 at 10:55