Year

Return a four-digit year (a number from 1900 to 9999) for a given date value.

Syntax
      Year(date_value)

Key
   date_value  A valid date.

The Year() function may be used in VBA or in an SQL query.

Examples

Dim intDemo as integer
intDemo = Year(dtmShiftEnd)
intDemo = Year(#31/12/2012#)

Select * from orders where Year(Order_date) = 2012;

“I'm spending a year dead for tax reasons” ~ Douglas Adams

Related:

Day - Return the day of the month.
DatePart - Return part of a given date.
Month - Return the month for a given date.


© Copyright SS64.com 1999-2014
Some rights reserved