year()

Read(289) Label: date value, get year,

Description:

Get the year from a date value.

Syntax:

year(dateExp)

Note:

The function gets the year from the date dateExp.

Parameters:

dateExp

A date or a date expression in standard format

Return value:

An integer

Example:

year(datetime("19800227","yyyyMMdd"))

1980

year("1972-11-08 10:20:30")

1972

year(datetime("2006-01-15 13:20:45"))

2006

Related functions:

month()

day() 

hour()

minute()

second()

millisecond()