YEAR()

Syntax. YEAR(serial_number)

Definition. This function extracts the four-digit year from a date. The YEAR() function returns an integer between 1900 and 9999.

Arguments

Background. With this function, as well as with the MONTH() and DAY()functions, you can extract components for use in other calculations.

Take care not to enter the dates as text. The values returned by the functions YEAR(), MONTH(), and DAY() correspond to the Gregorian calendar.

See Also

For more information about saving dates in Excel, see the section titled The Excel Date System in Chapter 2.

Example. You might want to use the Excel AutoFilter to sort a set of data by year and need to calculate the year values from the date column by using an auxiliary column. To do this, use the formula

=YEAR(serial_number)

Here are a few more examples:

See Also

DAY(), HOUR(), MINUTE(), MONTH(), NOW(), SECOND(), TODAY(), WEEKDAY()