Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.
Public Function IsValidTime(ByVal TheTime As String) As Boolean ' Format 1 validates the time against the 12 hour format Dim Format1 As String = "^ *(1[0-2]|[1-9]):[0-5][0-9] *(a|p|A|P)(m|M) *$" Dim TryValidateFormat1 As New System.Text.RegularExpressions.Regex(Format1) ' Format 2 validates the 24 hour format Dim Format2 As String = "([0-1][0-9]|2[0-3]):([0-5][0-9])" Dim TryValidateFormat2 As New System.Text.RegularExpressions.Regex(Format2) Return TryValidateFormat1.IsMatch(TheTime) Or TryValidateFormat2.IsMatch(TheTime) End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.