Check if Extracted date is in specific format

Hi, I have extracted a date from an application and I want to verify if the date is in that particular format: 12/19/2024 7:28:07. MM/dd/yyyy HH:mm:ss

Thanks

Hi!

Give a try with

IsValidDate = DateTime.TryParseExact("12/19/2024 7:28:07", "MM/dd/yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, Nothing)

Regards!

@Murthy_Chethana,

Refer this thread for learning

1 Like