I do not know what I'm over looking... Why does this generate an exception "String was not recognized as a valid DateTime."?
string dt = "7/28/2018 2:48:32 PM";
try
{
DateTime Test = DateTime.Parse(dt);
}
catch { }
I stepped through my code several times before I commented it out and replaced with the above as a test. the value I am assigning to dt is actually what gets assigned in my program. I was originally using something like:
if (DateTime.TryParse(dt, out DateTime Timestamp))
{ ... }
Not that it matters, but I'm using Visual Studio 2017 and .Net 4.6.2.