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.P
Just insert a separator before minutes (for example, a whitespace) and then you can parse it like this:
string example = "20151210 832";
example = example.Insert(example.Length - 2, " ");
var dateTime = DateTime.ParseExact(example, "yyyyMMdd H mm", CultureInfo.InvariantCulture);
I assume that the datetime string always contains two digits specifying minutes (check an article about Custom Date and Time Format Strings). If my assumption is wrong then this string cannot be parsed.