The addworkdays function adds a specific number of work days to a date.
Syntax
=addworkdays([date], [number of work days])
Parameters
[date]
Use one of the following values:
- Variables
- Template parameters
- Entity fields
- A manually entered date
- The current date and time with
{=System:Now}
[number of work days]
Enter an integer from 1 to 250.
- Minimum value: 1
- Maximum value: 250
Examples
=addworkdays({=Document:DATE_CREATE}, 1) returns a date that is 1 work day after the document creation date.
=addworkdays('2/2/2024', 1) returns 2/5/2024 (Monday). 2/2/2024 is a Friday, and Saturday and Sunday are set as weekends.
Set work days and holidays
To change weekends or holidays:
- Go to Settings.
- Open the Business hours tab.
All other days count as work days.
addworkdays function does not change the original date in the [date] parameter. For example, if you use the item creation date, the function keeps that value unchanged. It only calculates a new date based on it.
To save the result, store it in a separate field or variable.
Learn how to insert values using special macros
Example use case
You can use the function to set task deadlines automatically.
In this example, the workflow creates a task with a deadline 10 work days after the task creation date.
- Add the Create task activity to the workflow.
- In the Deadline field, enter:
=addworkdays({=System:Now}, 10).
When the workflow runs, the task deadline is set to 10 work days after the creation date.
To insert the calculated date into notifications, tasks, or Feed posts, wrap the function in double curly braces:
{{=addworkdays ({=System:Now}, 10)}}