BUSINESS_HOURS_NEXT_START_DATE
Description
Returns the next Datetime business hours open after the specified target date; returns the target date itself if it's within business hours. The result is returned in GMT.
Syntax
BUSINESS_HOURS_NEXT_START_DATE(target_date, business_hours_name_optional) -> Datetime
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| target_date | Datetime | Yes | The Datetime from which to find the next start of business hours. |
| business_hours_name_optional | String | No | The name of the business hours. If omitted, the default schedule is applied. |
Examples
BUSINESS_HOURS_NEXT_START_DATE(TO_DATETIME("2023-10-01T10:00:00Z"))
-- Returns the specified Datetime if it's within the default business hours; otherwise, returns the next start time after it.BUSINESS_HOURS_NEXT_START_DATE(NOW(), "Weekday9to5")
-- Returns the current Datetime if it's within "Weekday9to5" hours; otherwise, returns the next start time after it.