Date Difference
Counts the days, weeks, months, quarters or years between two dates.
Date Difference tells you how far apart two dates are, in days, weeks, months, quarters or years. Use it to check how old an invoice is, how many months a contract has run, or whether a deadline has passed. For hours, minutes and seconds, use Time Difference.
Add the action
In the Process Designer toolbox, open DateTime and pick Date Difference (or type Date Difference in the search box).

Inputs and outputs
| Field | Direction | Type | Required | What to put / what you get |
|---|---|---|---|---|
| Unit of Time | Input | Option list | Yes | Day, Week, Month, Quarter or Year. |
| First Datetime | Input | Date and time | Yes | The start date. |
| Second Datetime | Input | Date and time | Yes | The end date. |
| Difference | Output | Integer | Yes | Second Datetime minus First Datetime, in the unit you chose. Negative when the second date is earlier. |
How each unit is counted
- Day: full 24-hour periods between the two moments. A remainder of less than a day is dropped, so the time of day matters.
- Week: the number of week boundaries crossed, with weeks running Sunday to Saturday. Saturday to the next day, Sunday, already counts as
1. - Month, Quarter, Year: the number of calendar months, quarters or years crossed. The day of the month is ignored, so 31 January to 1 February is
1month.
Example
| Unit of Time | First Datetime | Second Datetime | Difference |
|---|---|---|---|
| Day | 2024-01-01T00:00:00 | 2024-03-01T00:00:00 | 60 |
| Day | 2024-03-01T00:00:00 | 2024-01-01T00:00:00 | -60 |
| Day | 2024-01-01T12:00:00 | 2024-01-02T11:00:00 | 0 (only 23 hours) |
| Week | 2026-11-07 (Saturday) | 2026-11-08 (Sunday) | 1 |
| Week | 2026-11-02 (Monday) | 2026-11-15 (Sunday) | 2 |
| Month | 2024-01-31 | 2024-02-01 | 1 |
| Quarter | 2024-03-31 | 2024-04-01 | 1 |
| Year | 2024-12-31 | 2025-01-01 | 1 |
Good to know
- The order matters: put the earlier date in First Datetime to get a positive number.
- For Day, the time of day counts. To count calendar days, give both dates the same time (for example
00:00:00). - A date with a UTC offset is first converted to UTC. An empty date stops the step with an error.

