Quote Originally Posted by menta View Post
Calculating time from Midnight is not possible since it more than 16Bit.
Moreover, If start time is 13:00:00 and end time is 01:00:00 will be also a problem.
Which is why I suggested only counting every other second above....
Or like DT said, you have another bit that'll signify AM or PM...
Code:
time_of_day var bit
am con 0
pm con 1
if time_of_day = 0 ' then it must be between 0000 and 1159
if time_of_day = 1 ' then it must be between 1200 and 2359...

Or again, you can use a LONG variable type and use a 32 bit (ok, 31 plug a sign) variable type.