-1

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.

Bagzli
  • 5,820
  • 16
  • 69
  • 144

3 Answers3

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
  • 9,926
  • 2
  • 23
  • 46
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
  • 11,588
  • 5
  • 34
  • 42
0

Its an ISO 8601 timestamp with timezone information. The -05:00 means minus 5 hours.

James Coyle
  • 9,019
  • 1
  • 33
  • 47