YEAR

Returns the year corresponding to serial_number. The year is given as an integer in the range 1900-9999.

Syntax

YEAR(serial_number)

Serial_number   is the date-time code used by Microsoft Excel for date and time calculations. You can give serial_number as text, such as "15-Apr-1993" or "4-15-93", instead of as a number. The text is automatically converted to a serial number. For more information about serial_number, see NOW.

Remarks

Microsoft Excel for Windows and Microsoft Excel for the Macintosh use different date systems as their default. For more information, see NOW.

Examples

YEAR("7/5/90") equals 1990

If you are using the 1900 date system (the default in Microsoft Excel for Windows), then:

YEAR(0.007) equals 1900

YEAR(29747.007) equals 1981

If you are using the 1904 date system (the default in Microsoft Excel for the Macintosh), then:

YEAR(0.007) equals 1904

YEAR(29747.007) equals 1985