Skip to main content

YEAR function

Returns the year specified by a given date.

Syntax

year(<date>)
ParameterTypeDescription
datetimestampThe date from which to extract the year. Must be an expression returning a timestamp type, or a reference to a date column.

Usages

year(`created_at`)
year(date_value(`processed_at`))