Share this page:

MS Access: Year Function

This MSAccess tutorial explains how to use the Access Year function with syntax and examples.


The Microsoft Access Year function returns a four-digit year (a number from 1900 to 9999) given a date value.


The syntax for the Microsoft Access Year function is:

Year ( date_value )

Parameters or Arguments

date_value is a valid date.

Applies To

The Year function can be used in the following versions of Microsoft Access:

  • Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000


Year (#22/11/2003#)
Result: 2003

Year (#01/01/1998#)
Result: 1998

Example (in VBA Code)

The Year function can be used in VBA code in Microsoft Access. For example:

Dim LYear As Integer

LYear = Year(#12/03/2001#)

In this example, the variable called LYear would now contain the value of 2001.

Example (in SQL/Queries)

You can also use the Year function in a query in Microsoft Access.

Microsoft Access