I am trying to convert a string to a date with an "am"/"pm" in it.. What I have created seems to work fine if the date/time is hardcoded in...
ftpDateTime = DateTime.ParseExact("1/25/14 06:33PM", "M/d/yy hh:mmtt", CultureInfo.InvariantCulture);
But NOT when the datetime is in a string field, even though the dates in both match exactly. I get a format error.. (see attached image showing date in the string field & error).
ftpDateTime = DateTime.ParseExact(dspDate, "M/d/yy hh:mmtt", CultureInfo.InvariantCulture);
Does anyone know WHY??? Thanks..