YEAR Date Function TSQL Tutorial

YEAR is an date function and returns an integer that represents the year of the specified date.

YEAR Syntax:

YEAR (date)

YEAR Example:

SELECT YEAR('2014-03-01') as Result_1,
YEAR('2014-03-01 17:01:25.1234567 +07:10') as Result_2,
YEAR(SYSDATETIME()) as Result_3;

Result_1Result_2Result_3
201420142014