This has been driving me crazy for months. I hate time calculations. I have simplified my situation to just use the hour in 24 hour format since I can't find a way to do this with the datetime data.
Here's the deal, I need a function/procedure that will evaluate 3 integers and return a t/f response. The first two values are a start and end 'hour', the third is the current 'hour'. For example, if the start is 21, end is 6 and the current is 3, I need a false response. If the current is 7 it should return true.
In other words, if the current hour falls on 21,22,23,0,1,2,3,4,5 the response should be false, if it falls on 6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 the response should be true.
To complicate things, the start can be zero with an end of 6. Anything between 0 and 6 needs to return false, anything greater than 6 would be true.
Any assistance would be appreciated!!