Skip to main content

yearOf

yearOf ( aDate : date ) : integer

ParameterTypeDescription
aDatedate->Date for which to return the year
Resultinteger<-Number 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