Checkin if hour is within timespan

ok, Ive been fighting with this for a while and I am stuck…

What is the straightforward way to check if NowTime.hour is within 19 and 06 hours ?

I think this works… found it on SO…

[code]if from < till then

if Nowtime.Hour >= val(from) and Nowtime.Hour <= val(till) then
/// run

end

else

if Nowtime.Hour >= val(from) or Nowtime.Hour <= val(till) then
/// run

end

end[/code]

Thanks Julian… I had set 19 and 6 just as dummy dates… I understand the logic, though…

Convert initial,final and test time/date (yes, with date) to TotalSeconds https://documentation.xojo.com/index.php/Date.TotalSeconds

Test if test time is between initial and final (just an idea)