Don’t know why my DateTime.ParseExact call doesn’t work, anyone please help. Thanks.
Activity 1: Assign
sTmp = “5/4/2020 10:54 PM”
Activity 2: Assign
oDateTime = DateTime.ParseExact( sTmp, “dd/MM/yyyy hh:mm tt”, System.Globalization.CultureInfo.InvariantCulture)
Where sTmp is String and oDateTime is DateTime
When I test it in Studio, i got the following error
Assign: String was not recognized as a valid DateTime.
Here is my version info:
Studio Pro 2020.10.2 - 10/23/2020
Update Channel: Stable
Microsoft Windows 10 Enterprise 64-bit
.NET Framework Version 4.8 or later
I also uploaded the project for your easier reference.
TestConversion.zip (33.4 KB)