tech on the net
Home About Us Feedback Site Map


Access Excel Word


SQL Oracle / PLSQL SQL Server MySQL MariaDB PostgreSQL

Web Development

HTML CSS Color Picker


C Language


ASCII Table Linux UNIX Java Clipart Joke of the Moment
Share this page:

MS Access: Year Function

Learn 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:


Year (#22/11/2003#) would return 2003
Year (#01/01/1998#) would return 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