year()

Read(2631) 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.

Parameter:

dateExp

A date or a date expression in standard format; it can be an integer, which we can regard as the value of computing days@o().

Return value:

Integer

Example:

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

1980

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

1972

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

2006

year(19000)

2019

Related function:

month()

day() 

hour()

minute()

second()

millisecond()