Skip to main content
Version: 1.0.0

yearOf

yearOf* ( aDate : date ) : integer

ParameterTypeDescription
aDatedateDate for which to return the year
ResultintegerNumber indicating the year of aDate

Description

The yearOf command returns the year of aDate.

Example

 var vResult : integer
vResult = yearOf(!12/25/92!) // vResult gets 1992
vResult = yearOf(!12/25/1992!) // vResult gets 1992
vResult = yearOf(!12/25/1892!) // vResult gets 1892
vResult = yearOf(!12/25/2092!) // vResult gets 2092
vResult = yearOf(currentDate) // vResult gets year of current date

See also

dayOf
monthOf