year

Returns the year of a date or date-time value as a number.

Function

result = year(input)

Arguments

ArgumentData Type
inputdate (datetime will be implicitly cast to date)
resultinteger

Comments

This function operates in the local time-zone if a datetime input is provided. See Dates, Times and Time Zones.

Examples

result = year(#1988-11-25#) /* result = 1988 */
result = year(getdate())