How to parse a this datetime string in c#
Mar 25 2014 10:15:58:757AM
I have tried this, but not working.
DateTime val = DateTime.ParseExact(dateTimeStringValue, "MMM dd yyyy hh:mm:ss:fffTT", CultureInfo.InvariantCulture);
How to parse a this datetime string in c#
Mar 25 2014 10:15:58:757AM
I have tried this, but not working.
DateTime val = DateTime.ParseExact(dateTimeStringValue, "MMM dd yyyy hh:mm:ss:fffTT", CultureInfo.InvariantCulture);
Custom date and time format strings are case sensitive.
That's why you should use tt
instead of TT
.
DateTime.ParseExact("Mar 25 2014 10:15:58:757AM",
"MMM dd yyyy hh:mm:ss:ffftt",
CultureInfo.InvariantCulture);