SQL Server YEAR() Function

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP







<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->



SQL Server YEAR() Function




❮ SQL Server Functions



Example


Return the year part of a date:



SELECT YEAR('2017/08/25') AS Year;

Try it Yourself »


Definition and Usage


The YEAR() function returns the year part for a specified date.



Syntax



YEAR(date)


Parameter Values





Parameter Description
date Required. The date or datetime to extract the
year from

Technical Details




Works in: SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data
Warehouse, Parallel Data Warehouse

More Examples



Example


Return the year part of a date:



SELECT YEAR('1998/05/25 09:08') AS Year;

Try it Yourself »





❮ SQL Server Functions


Popular posts from this blog

Malaysia to Papua New Guinea by motorcycle?

.name

List of Bhojpuri films