Hi !
I want to check if time is between two times like #00:00:00#< time < #08:00:00#, I tried to do this but it throws an error that "Cannot apply Boolean together with Time"
How do I check if a time falls between a time range ?
Thanks !
--> EDIT:I am not looking for difference I am clearly asking how to check if a time falls within a range like between two times
Hello Shahan,
you can use like this,
#00:00:00# < Time and Time < #08:00:00#
Please try this and let me know.
Regards,
Ajit Kurane.
thanks it works, I thought time<TIME<time would work but sadly it doesnt need to have an and in between
Glad that I could help you.
The reason why time < TIME < time doesn't work in OutSystems and, afaik, most programming languages, is that "time < TIME" results in a boolean value (True or False), which can't be compared to the second "time".
Hi Shahan Alam,
I have attached the some similar thread, that might help youhttps://www.outsystems.com/forums/discussion/64972/different-between-two-times/
https://www.outsystems.com/forums/discussion/62808/time-difference-function/
Please gothrough the below document
https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Functions/Date_and_Time
you can use the DiffHours(DateTime, DateTime) ,DiffMinutes(DateTime, DateTime) as per your use case
Hope this helps!
Ellakkiya.S