The addWorkDays() function provides the ability to add or subtract weekdays (i.e., Monday through Friday) from a date.
Syntax
addWorkDays(date, integer, [holidays])
Argument | Description |
date
(required) |
An expression that results in a date value (i.e., a hard-coded date, a reference to a date attribute, or a function that returns a date value). |
integer
(required) |
The value to add to the date argument. If the value provided is not an integer, it will be rounded to the nearest integer. |
holidays
(optional) |
An expression that results in a comma separated list of date values (i.e., hard-coded dates or a reference to an attribute). These dates will be ignored, along with weekends, when adding work days.
Note: If the holidays argument is hard-coded, it should be surrounded in quotation marks (e.g., “2020-12-25, 2021-01-01”). |
Where Available
- Available in all places the expression or injected expression icon is visible, as well as within Filter fields on Cards, Tables and List/View sections.
Examples
Where | Example(s) |
Business rules: Set Value
Attribute expression |
addWorkDays("2023-02-07", 6)
both of the examples above would result in 2020-12-15
|
Field Editability expression
Tab Visibility expression Business rules: Condition |
Stage_3_date__c < addWorkDays(Stage_2_date__c, 30) |
Business rules: Notification Subject
Business rules: Notification Body Dynamic Filter |
{!addWorkDays(Stage_2_date__c, estimated_effort__c)}
|
Embedded Section URL attribute
Business Rule: URL Call External View URL on List/View |
{!URL1__c & "/" & addWorkDays(Program_Start_Date__c, -20)}
|
Metric expression | sumif(Initiative__t, OPEX__m, active and due_date__c < addWorkDays(start_date__c, 10, Holidays__c))
|