In a formula column, the DAY_DELTA() function calculates the difference in days between two date-type columns. It is useful for measuring a duration or a delay.
-
Function name:
DAY_DELTA()
Syntax
DAY_DELTA(date_1, date_2)
Calling function parameters in TimeTonic:
- $field_name = field (link, linked table column, number, selection, formula, text...).
- "free text" = free text to add within quotes.
- do not use quotes for numbers.
Parameters
| Parameter | Description |
|---|---|
date_1 |
The more recent date (the result corresponds to date_1 minus date_2). |
date_2 |
The reference date to subtract. |
Example
To find out the number of days between a start date and an end date:
DAY_DELTA($End, $Start)
Result: 7 when there is a 7-day difference between the two dates.
Return type
The function returns a number (the difference expressed in days).
The output type format of the result can be configured in the output field options in the formula editor. For more details, see Output format options in the Formula Column article.
Business use case
DAY_DELTA() measures durations: processing time for a request, age of a file, duration between order and delivery.
Best practice
To track a delay in real time, replace date_1 with TODAY(): DAY_DELTA(TODAY(), $Opening Date) gives the current age.