Year

year returns the year number (1600 to 9999) from a date.

Syntax

 year(DATE_EXPR)

Examples

 # What is the year number today?CURRENT_DAY = year(date$)# Which year was the "Bastille Day" ?LONG_AGO=day([14/07/1789]) : # 1789

Description

year returns the day number of a valid date, including the century.

When the date is a null date ([0/0/0]), the function returns 0.

The type of result is Integer.

Associated errors

ErrorDescription
10The argument is not a date.
56The date is incorrect.

See also

day, month, week, month$, day$, gdat$, dayn, nday, date$, datesyst, Date.