year

Return the year

Syntax

year(dt_expr)

Arguments

dt_expr A date expression.

Description

This function returns the year component of the specified date expression.

Example

select year(curdate()) as Year;

  Year
  2013