I need to convert a string
with date
to valid c# date time object.
input string example = "2015-03-24T12:31:33.8700000"
output c# datetime
I tried doing this
DateTime.ParseExact(x.claimDetails.clmDOA, "yyyy-MM-dd HHmmss", CultureInfo.InvariantCulture)
Buit it gave exception
String was not recognized as a valid DateTime
Please Note: I googled thoroghly . Somehow i couldnt find any string
with "T"
included as in datetime
string.
- Prior to downvoting if one can suggest me exactly where a question is answered with datetime string containg a
T
in it or of this format.yyyy-MM-dd'T'hh:mm:ss.fffffff