D_D
D_D

Reputation: 1049

DateTime.ParseExact, Ignore the timezone

If I have a date such as 2011-05-05T11:35:47.743-04:00

How can I ignore the timezone (-04:00) when I do a DateTime.ParseExact programatically?

Upvotes: 21

Views: 11703

Answers (1)

V4Vendetta
V4Vendetta

Reputation: 38220

DateTimeOffset dt =DateTimeOffset.Parse("2011-05-05T11:35:47.743-04:00", null);

Upvotes: 25

Related Questions