Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Returns the year component of the TIMESTAMP argument.
YEAR( timestamp-expression )
timestamp-expression A TIMESTAMP value.
SMALLINT
The value returned is the years component of the given TIMESTAMP value, returned as a SMALLINT.
The following example returns the value 2001.
SELECT YEAR( '2001-09-12' );