Loading lesson path
Concept visual
Start at both ends
Return the year part of a date:
SELECT YEAR('2017/08/25') AS Year;The YEAR() function returns the year part for a specified date.
date )
Required. The date or datetime to extract the year from
int
SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse
Return the year part of a date: SELECT YEAR('1998/05/25 09:08') AS Year;
❮ SQL Server Functions