Forum Discussion

HerberthSolano's avatar
HerberthSolano
Qrew Trainee
2 years ago

Hour Comparison

Hello quickbase community,

I have a question:
Is it possible to compare which hour is greater between one and the other?

For example:

if [Date Created] is less than 7:30 AM return "Created outside business hours"

Regards, 

Herberth Solano.

------------------------------
Herberth Solano
------------------------------

1 Reply

  • You will need to Use the ToTimeOfDay function to turn everything into a recognized time, and also have multiple conditions to check if it is between business hours (less than 7:30am doesnt mean much. 2pm the prior day is less than 730am...)

    If(
       ToTimeOfDay([Date Created]) <  ToTimeOfDay("7:30am")  and
       ToTimeOfDay([Date Created]) >  ToTimeOfDay("5:00pm"),

       "Created outside of business hours"
    )

    Check the to time of day function to be sure my syntax of 7:30am is correct. not sure if you need to use a 24 hour clock or anything, but I think it accepts all standard time formats.

    ------------------------------
    Mike Tamoush
    ------------------------------