Explore recipe: Filtering queries by business hours

Have more questions? Submit a request

2 Comments

  • James Molina
    Comment actions Permalink

    This is great!  Can you explain how the formula would be updated if you had different business hours for Saturday and different for Sunday?

    0
  • Eugene Orman
    Comment actions Permalink

    That's a good question, James. 

    You will need to add two more OR conditions. Here is a formula examle: 

    IF ((IN([Ticket created - Day of week],ARRAY("Monday", "Tuesday","Wednesday","Thursday","Friday"))
    AND IN([Ticket created - Hour],ARRAY("9", "10", "11", "12", "13", "14", "15", "16")))
    OR([Ticket created - Day of week]="Saturday" AND IN([Ticket created - Hour],ARRAY("9", "10", "11", "12", "13", "14", "15")))
    OR([Ticket created - Day of week]="Sunday" AND IN([Ticket created - Hour],ARRAY("10", "11", "12", "13", "14"))))
    THEN TRUE
    ELSE FALSE
    ENDIF

    To check if it returns reasonable results, you can run this query:

    0

Please sign in to leave a comment.

Powered by Zendesk