I have a string s = "May 16, 2010 7:20:12 AM CDT
that i want to convert into a DateTime object. In the code below i get a Date format cannot be converted error when attempting to parse the text with a known format.
timeStamp = matches[0].Groups[1].Value;
dt = DateTime.ParseExact(timeStamp, "MMM dd, yyyy H:mm:ss tt", null);
The timezone comes in as CDT UTC... and i think is whats causing the problem or my format?
var dt = DateTime.ParseExact(s, "MMM dd, yyyy H:mm:ss tt 'CDT'", null);
? – Vlad