year

The year of a Date, a LocalTimestamp, or a Timestamp in UTC.

ScalarDeterministic

Flags

Flag Value
Kind scalar
Nulls a null argument gives null
Deterministic yes
Order matters no
Decomposable no

Example

A pipeline from the language's tested corpus that uses year, over the example tables.

Hint
from orders
derive {y = year(day), m = month(day), d = day(day), w = weekday(day), q = quarter(day), doy = day_of_year(day)}

In a plan:

JSON
{
  "args": [
    {
      "col": 5
    }
  ],
  "fn": "year"
}