In a formula-type column, the YEAR_ADD() function displays a date obtained by adding a number of years to a date-type column.
-
Date function name:
YEAR_ADD()
Syntax
YEAR_ADD(date_column, number_of_years)
Calling function parameters in TimeTonic:
- $field_name = field (link, related table column, number, selection, formula, text...).
- "free text" = free text to add within quotation marks.
- do not use quotation marks for numbers.
Parameters
| Parameter | Description |
|---|---|
date_column |
The date-type column to which years are to be added. |
number_of_years |
The integer number of years to add. Positive to move the date forward, negative to move it backward. |
Example
YEAR_ADD($Date, 1)
The column returns the date shifted by one year.
Notes
- The number of years can be negative: the function then moves the date backward.
Return type
The function returns a date.
The output type format of the result 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_ADD() calculates annual deadlines: contract anniversary date, warranty expiration, renewal date.
Best practice
To identify upcoming deadlines, combine YEAR_ADD() with DAY_DELTA_TODAY() on the resulting date.