As the question states, I'm trying to figure out what this datetime format is: 2019-01-17T10:49:55-05:00
. Through research, I've figured out up to this point: yyyy-MM-ddTHH:mm:ss
But the last few numbers, I have no idea what they represent. The only thing I came up with is milliseconds but that is usually 3 number after a decimal like this: .fff
which does not fit this scenario.
Asked
Active
Viewed 1,722 times
-1

Bagzli
- 6,254
- 17
- 80
- 163
-
3Looks like the ISO 8601 format – Sweeper Jan 21 '19 at 15:44
3 Answers
3
It looks like ISO8601 format. The last section is how far from UTC/GMT it is. In this case -5 hours.
To add a bit more, this is THE standard way to transfer date and times between systems.

Neil
- 11,059
- 3
- 31
- 56
-
how would you write that to parse it? What are the letters to represent it? – Bagzli Jan 21 '19 at 15:45
-
1
2
It is a date in ISO8601 format. The -05:00
represents the UTC offset.
You can parse it using DateTime.ParseExact
like so:
var ds = "2019-01-17T10:49:55-05:00";
var date1 = DateTime.ParseExact(ds, "yyyy-MM-ddTHH:mm:sszzz", CultureInfo.InvariantCulture);

haldo
- 14,512
- 5
- 46
- 52
0
Its an ISO 8601 timestamp with timezone information. The -05:00 means minus 5 hours.

James Coyle
- 9,922
- 1
- 40
- 48