year

Returns an integer that represents the year in the datepart of a specified date.

Syntax

year(date_expression)

Parameters

Examples

Usage

year(date_expression) is equivalent to datepart(yy, date_expression).

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute year.

Related concepts
System and User-Defined Datatypes
Related reference
datepart
day
month