79549168

Date: 2025-04-01 20:51:43
Score: 0.5
Natty:
Report link
Dim enUS As New CultureInfo("en-US")
Dim dtDate As Date

'TryParseExact returns a boolean (Success/Fail)
If DateTime.TryParseExact(metaDateTime, "yyyy:MM:dd HH:mm:ss", enUS, Globalization.DateTimeStyles.NoCurrentDateDefault, dtDate) then
    'valid date - dtDate contains the converted date value
Else
    'the metaDateTime wasn't in the correct format
End If
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: CPRouse