>>In your original parameters Shift2Start seems to be after Shift2End. Or do you mean it should be the next day?
>>
>>set @Shift2Start ='19:00'
>>set @Shift2End ='06:59'
>>
>>
>>I also tried to use datetimes instead of characters for comparison. However, I'm not sure the formula to convert datetime to time is correct.
>
>It is, if gives you only HH:MM part of the datetime.
No, I meant the one I used to convert datetime to base date time, in other words, I want to use as
datetime(1900,1,1, h, m) from datetime value.
If it's not broken, fix it until it is.
My Blog