Date Compare Issue

You have to convert this to a datetime value using ParseExact. This method takes a format string so it knows how to parse the string.

DateTime.ParseExact(“Jan, 05, 2022 10:10 AM”,“MMM, dd, yyyy hh:mm tt”,System.Globalization.CultureInfo.InvariantCulture)

Then you can compare that datetime value to Now:

image

1 Like