Hi guys,Programmers, what algorithm would you use to check that a given time (current timestamp in 24hr) is within a preset start and end times and if so, do specific stuff?Scenario:StartTime = 0600EndTime = 1800TimeNow = 0950An algorithm likeIf TimeNow >= StartTime and <= EndTime then allowwould workHowever, this will not work if the Start/End time spans across 2 days:StartTime = 1800EndTime = 0600TimeNow = 0550Using the logic will fail yet 0550 is logically within the preset timeframe
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke