In a formula-type column, the YEAR() function displays the year from a date-type column.
-
Date function name:
YEAR()
Syntax
YEAR(date_column)
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 from which you want to extract the year. |
Example
YEAR($Date)
For a date in 2022, the column returns 2022.
Return type
The function returns a number (the year in 4 digits).
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() is used as an annual key: comparing volumes year over year, archiving by fiscal year.
Best practice
Combine YEAR() with MONTH(), WEEK(), or QUARTER() to build chronological grouping keys.