I'm pretty sure that I am making some very stupid error but this is driving me insane.
I am trying to do the following:
var dateTime = DateTime.ParseExact("08/24/2016 12:00:00 AM", "MM/dd/yyyy HH:mm:ss tt", CultureInfo.InvariantCulture);
But I keep getting the following exception: "String was not recognized as a valid DateTime."
I have tried: "M/dd/yyyy HH:mm:ss tt" "MM'/'dd'/'yyyy HH:mm:ss tt" "M'/'dd'/'yyyy HH:mm:ss tt"
But nothing working so far... Any help would be appreciated.