Use Days between dates calculation action to compute how many days have passed between two dates. For instance, you can use Days between dates calculation to determine the length of a business trip, calculate waiting periods, the number of days until a certain event or the remaining days until the end of an employee's trial period.
Example use cases
Calculate Filing Deadlines
Integrate the Days between dates calculation action in modules that generate documents that need to be filed with government agencies. While the agency is contacted via email and sent a digital version of the documents, the user is notified to file a physical and signed copy within '14 days' of the date of interaction.
Hide features from or display features for new hires
Combine Days between dates calculation with conditional logic to hide certain options from employees who have been with the company for less than 30, 60, 90, 180, ... days. This may be useful when you want to provide certain perks only to employees who, e.g. have completed their trial periods. Conversely, you can display certain options to only those employees, e.g. questionnaires tailored towards new hires.
Calculate if compliance training is up to date
In some industries it is common to complete a mandatory compliance training within 30 days of beginning employment, as well as annual trainings from then on. Combine Days between dates calculation with Date calculation and conditional logic to display different messages, depending on the time passed since the employee's last training.
Pro Tip: Reference the information within a Send email action to send the user an email with upcoming training dates, sign up sheets or a simple reminder to have the training completed by the calculated date.
Procedure
Follow the steps below to add a Days between dates calculation action to your module.
To add a Days between dates action to your module follow the steps below:
- Click the plus icon " + " on a node.
- Select Create Action.
- In the attribute editor that opens, choose Days between dates.
You should now see several empty parameters on the attribute editor. Learn about filling out this form in the Parameters section below.
Parameters
Calculate days between Dates |
Calculate the number of days between Start date and End date. E.g.: the days between today and tomorrow is 1. |
Select start date |
Enter a Start date for your calculation directly into this field or reference a date collected in another node. |
Select end date |
Enter an End date for your calculation directly into this field or reference a date collected in another node. |
Start date inclusivity |
Choose whether the selected start date is part of the calculation. By default the start date is not included. |
End date inclusivity |
Choose whether the selected end date is part of the calculation. By default the end date is not included. |
Define Weekdays to Skip |
Choose weekdays to be skipped during the date calculation. In case the toggle is switched off the skip weekdays functionality is disabled, although weekdays might be selected. Note that it is not possible to select all weekdays. |
Define Dates to Skip |
Choose custom dates, date variables or interaction based dates to be skipped during the date calculation. In case the toggle is switched off the skip dates functionality is disabled, although dates might be selected. |
Illustrated Examples
The following illustrated examples provide more insights into the mechanics behind days between dates.
Symbols used in illustrations:
Examples: Default Settings
In the above example both the selected start and end date are 01.06.20, thus the days between is 0. Note that different settings regarding inclusivity of start and end date are not affecting the result.
In the above example the selected exclusive start date is 01.06.20 and the selected inclusive end date is 01.11.20. The resulting number of days between is 5 days.
In the above example the selected inclusive start date is 01.06.20 and the selected exclusive end date is 01.11.20. The resulting number of days between is 5 days.In the above example the selected exclusive start date is 01.06.20 and the selected exclusive end date is 01.11.20. The resulting number of days between is 5 days.
In the above example the selected inclusive start date is 01.06.20 and the selected inclusive end date is 01.11.20. The resulting number of days between is 6 days.
Examples: Skip dates
In the above example the selected inclusive start date is 01.06.20, the selected exclusive end date is 01.11.20 and the defined skip dates are 01.08.20 and 01.09.20. The resulting number of days between is 3 days.
In the above example the selected inclusive start date is 01.06.20, the selected exclusive end date is 01.11.20 and the defined skip dates are 01.08.20, 01.09.20 and 01.11.20. The resulting number of days between is 3 days. Note that one of the defined skip dates coincides with the selected end date and that due to the end date is excluded this circumstance does not affect the resulting number of days between.
In the above example the selected exclusive start date is 01.11.20, the selected inclusive end date is 01.06.20 and the defined skip dates are 01.08.20 and 01.09.20. The resulting number of days between is -3 days. Note that start and end date are chronologically reversed, thus the calculated result has a negative sign.