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.

Examples

Dim intDemo
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.
GetDate.vbs - Return the current Year/month/Day and time.


 
Copyright © SS64.com 1999-2019
Some rights reserved