Use the Calculate Dates action to add or subtract a certain number of days to a given date. As an output, you will receive a new date. You can also add or subtract weeks, months, or years. It is possible to skip certain days and exclude them from the calculation.
Calculate dates
- Create an action and select Calculate Dates.
- Select a date to calculate with.
- Decide whether to add or subtract time from the selected date
- Determine how many days, weeks, months, and/or years should be added or subtracted. You can combine different units and you can reference other variables. You should only enter integers; decimal numbers will be rounded down.
Configurations
Define how exactly the new date is calculated:
Include the given date
You can decide to include the start date by toggling on the checkbox right to the input field. Including the start date means that counting starts on the start date itself, not on the next day. By default, the start date is not included.
Skip days
If you (also) add days to your date, you can decide to skip certain days and not include them in the counting. In this case, the calculated end date is shifted by one day for each skipped day between the start date and potential end date.
Use the toggle Skip days of the week to skip all occurrences of certain days of the week, e.g., all Sundays. Use the toggle Skip specific dates to skip some hard coded dates, e.g., December 25th, 2023.
Note that this only refers to the time unit of days. If your time unit (also) is weeks, months, or years, the calculated end date is only shifted when it coincides with a skipped date.
Apply skip rules only to last day
If you toggle on Apply skip rules only to last day, the skipped days you have specified will not be skipped when counting. Instead, if the calculated end date falls on a date that is configured to be skipped, it will be shifted to the next date that is not configured to be skipped.
For example, you can decide not to skip any dates but still ensure that the calculated end date is not on a weekend or on a bank holiday.
Related topics
- Use the Calculate Dates action to calculate and check against deadlines.
- Ask end users to input a date.
- Calculate the number of days between two dates.