In a formula-type column, the YEAR_DELTA_TODAY() function calculates the difference, in years, between today's date and a date-type column.
-
Function name:
YEAR_DELTA_TODAY()
Syntax
YEAR_DELTA_TODAY(date_column)
Calling function parameters in TimeTonic:
- $field_name = field (link, linked table column, number, selection, formula, text...).
- "free text" = free text to be added in quotes.
- do not use quotes for numbers.
Parameters
| Parameter | Description |
|---|---|
date_column |
The date-type column to compare with today's date. |
Example
YEAR_DELTA_TODAY($Date)
The column returns the number of years difference between today and the given date.
For project 3, there is a 3 year difference between today and the Date column.
Notes
- The calculation is based on today's date: the result automatically updates over time.
Return type
The function returns a number (the difference expressed in years).
The output type format can be configured in the output field options of the formula editor. For more details, see Output format options in the Formula Column article.
Business use case
YEAR_DELTA_TODAY() calculates an age or seniority in years: a client's age based on their birthdate, contract seniority.
Best practice
For an exact age, check the expected rounding method: the year difference may not account for the day and month depending on the case.