Year Function

Description

Returns a whole number representing the year.

Syntax

Year(date)

The date argument is any numeric or string expression, or any combination, that can represent a date. If date contains Null, Null is returned.

See Also

Date Function, Date Statement, Day Function, Month Function, Now Function, Weekday Function.

Example

This example uses the Year function to obtain the year from a specified date. In the development environment, the date literal is displayed in short date format using the locale settings of your code.


MyDate = #February 12, 1969#				' Assign a date.
MyYear = Year(MyDate)					' MyYea