Home > Language Reference > Date/Time Functions > Year$

Year$

The Year$ function returns the current year.

Usage

Used for example to concatenate the year with a filename.

Syntax

var$=Year$()

Parameter

None.

Return value

var$, string, current year in 4 characters.

See also

Date$
DateBetween
DateToDate$
Day$
Hour$
Hundreds
Min$
Month$
Sec$
Time$
WeekDay

Example

msgbox(Year$())