year

Description

Returns the year of the provided date.

Parameters

Return Type

Number

Examples

Example 1

print("Year is " + year(currentDate()));

Example 2

date varDateTime = "2011-08-17T18:30:55"; print("Year is " + year(varDateTime));

Print Year is 2011.

See also