Hello,
I have a piece of code that checks if the userinput is a specific time format.
The code works fine when I enter a time in the specific format.
But I also would like to be able to enter the format "HH:mm".
How should I alter my code so this is possible?
Thaqnks in advance!!!
I have a piece of code that checks if the userinput is a specific time format.
Code:
Dim dt1 As DateTime = Date.ParseExact(Me.txtBeginTijd.Text, "HH:mm:ss", Globalization.DateTimeFormatInfo.InvariantInfo)
Dim ts1 As TimeSpan = dt1.TimeOfDayBut I also would like to be able to enter the format "HH:mm".
How should I alter my code so this is possible?
Thaqnks in advance!!!