YEAR (TSQL Function)
Returns the year of the specified date.
Syntax
YEAR ( date )
Arguments
- date
- is an expression of type
date
ordatetime
.
Return Types
Returns int
.
Examples
PRINT YEAR('2016-10-04');
The result is:
2016
Returns the year of the specified date.
YEAR ( date )
date
or datetime
.Returns int
.
PRINT YEAR('2016-10-04');
The result is:
2016