Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Year Function

Returns a whole number representing the year.


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

The following example uses the Year function to obtain the year from a specified date:

Dim MyDate, MyYear
MyDate = #October 19, 1962#   ' Assign a date.
MyYear = Year(MyDate)         ' MyYear contains 1962.

Community Additions

© 2015 Microsoft