I'm having huge problems with solving this problem. I'm trying to parse a string using Datetime.ParseExact().
I have the following code:
DateTime.ParseExact("20151210 832", "yyyyMMdd Hmm", CultureInfo.InvariantCulture);
I get following error:
An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll Additional information: String was not recognized as a valid DateTime.
What am I doing wrong? How can I solve this problem?
UPDATE:
I can also get times like this:
00:01 => 1
01:00 => 1
01:10 => 10
See Question&Answers more detail:os