Year
Returns a whole number representing the year.
Syntax
Year(Val)
Parameters
Val
Type: Date
The date for which you want to return the year.
(return)
Type: Long
The Year.
Remarks
This is equivalent to DatePart("yyyy", Val).
Example
This example uses the Year function to return the year from the date recorded in the DataCollection.FinishTime system variable. For example, if the date in the variable is 20 May 2002, this example would return 2002.
Year(DataCollection.FinishTime)
See also