Survey Tabulation > Advanced expressions > UNICOM Intelligence function library > Date and time functions > Year
 
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 theDataCollection.FinishTime system variable. For example, if the date in the variable is 20 May 2002, this example returns 2002.
Year(DataCollection.FinishTime)
See also
Date and time functions