Returns the year of a specified date.

Syntax

<oRef>.getYear( )

<oRef><expD>

The Date object whose corresponding year number you want to return.

Property of

Date

Description

The getYear( ) method returns a date’s "year" number. A 4-digit year is always returned. The SET CENTURY setting has no effect on the getYear( ) method.