BUSINESS_HOURS_IS_WITHIN
Description
Returns TRUE if the specified Datetime is within defined business hours.
Syntax
BUSINESS_HOURS_IS_WITHIN(target_date, business_hours_name_optional) -> Boolean
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| target_date | Datetime | Yes | The Datetime value to evaluate. |
| business_hours_name_optional | String | No | The name of the business hours. If omitted, the default schedule is applied. |
Examples
BUSINESS_HOURS_IS_WITHIN(TO_DATETIME("2023-10-01T10:00:00Z"))
-- Returns TRUE if the specified Datetime is within the default business hours; otherwise, FALSE.BUSINESS_HOURS_IS_WITHIN(NOW(), "Weekday9to5")
-- Returns TRUE if the current time is within "Weekday9to5" hours; otherwise, FALSE.