Dim StartTime As Long
Dim EndTime As Long
DateTime.TimeFormat ="HH:mm:ss"
StartTime = DateTime.TimeParse("13:00:00")
EndTime = DateTime.TimeParse("14:00:00")
In B4i there is no DateTime.TimeParse command.
How can I achieve the same result. My goal is to check whether a time falls within a certain range
There are inherent problems with TimeParse and that's why it wasn't added in B4i. Mainly related to the days where the time zone changes.
You should use DateTime.DateTimeParse instead. You can use DateTime.Date(DateTime.Now) for the date part.
If all your times are in the 24-hour three-lots-of-two-digits format that you've indicated, then you can just compare them as strings, no parsing required.
And if the range crosses midnight but you think and program carefully, it works even then. ?