YEAR

Returns an integer that represents the year portion of the specified date.

Syntax

YEAR( date )

Behavior Type

  • Immutable if the specified date is a TIMESTAMP, DATE, VARCHAR, or INTERVAL
  • Stable if the specified date is aTIMESTAMPTZ

Parameters

date

The date to process, one of the following data types:

Examples

=> SELECT YEAR(CURRENT_DATE::DATE);
 YEAR
------
 2016
(1 row)

See Also

YEAR_ISO