YEAR

Description

Returns an integer that represents the year of the specified date. (YEAR in Transact-SQL).

Sample Source Pattern

Syntax

YEAR( date )  

Examples

Code:

IN -> SqlServer_01.sql
SELECT YEAR('10-10-2022') AS YEAR

Result:

YEAR |
-----+
2022 |

Last updated