Year
Returns a whole number representing the year.
Syntax
Year(<value>)
Parameters
<value>
Type: Date
The date for which you want to return the year.
(return)
Type: Long
The Year.
Notes
This is equivalent to DatePart("yyyy", Val).
Example
This example returns the year from the date in the DataCollection.FinishTime system variable. For example, if the date in the variable is 20 January 2023, this example returns 2023.
Year(DataCollection.FinishTime)
See also