F
frank
Hello,
I am developing a vb.net app and need a little help with determing if the current time is between two times. Kind of like a Shift:
if current time is between the hours of 0701 and 1500, then user is in Shift one
else if current time is between the hours of 1501 and 2300, then user is in shift two.
Ditto for shift three.
How do I compare the time now() and determine if it falls between two different hours?
I have tried something along these lines:
if now.timeofday < 0700 AND now.timeofday < 1500 then
'Do my bidding
else...
This doesn't work as vb.net doesn't allow a greater than/less than comparison on a timespan?
Any Help would be greatly appreciated.
Ciao,
Frankie
--
I am developing a vb.net app and need a little help with determing if the current time is between two times. Kind of like a Shift:
if current time is between the hours of 0701 and 1500, then user is in Shift one
else if current time is between the hours of 1501 and 2300, then user is in shift two.
Ditto for shift three.
How do I compare the time now() and determine if it falls between two different hours?
I have tried something along these lines:
if now.timeofday < 0700 AND now.timeofday < 1500 then
'Do my bidding
else...
This doesn't work as vb.net doesn't allow a greater than/less than comparison on a timespan?
Any Help would be greatly appreciated.
Ciao,
Frankie
--