I am attempting to parse the following String
into a DateTime
object in c#:
DateTime.ParseExact("20101108 230125", "yyyyMMdd hhmmss", null)
although the value looks correct the ParseExact
method just keeps giving me the following:
String was not recognized as a valid DateTime.
Can anybody tell me why and how I can parse the above string without having to do it the manual way? Isn't ParseExact
supposed to be for this kind of occasion?