BUSINESS_HOURS_ADD
Description
Adds a time interval to a starting Datetime, counting only business hours. The result is returned in GMT.
Syntax
BUSINESS_HOURS_ADD(start_date, interval_milliseconds, business_hours_name_optional) -> Datetime
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| start_date | Datetime | Yes | The starting Datetime. |
| interval_milliseconds | Long | Yes | The interval to add, specified in milliseconds. |
| business_hours_name_optional | String | No | The name of the business hours. If omitted, the default schedule is applied. |
Examples
BUSINESS_HOURS_ADD(CreatedDate, 8 * 60 * 60 * 1000)
-- Returns a Datetime 8 business hours after CreatedDate.BUSINESS_HOURS_ADD(ClosedDate, -5 * 8 * 60 * 60 * 1000, "Weekday9to5" )
-- Returns a Datetime 5 business days before ClosedDate using "Weekday9to5" hours.