YEAR

  • Updated

Returns the year corresponding to a given date.

 

Sample Usage

YEAR(DATE(2020,1,3))
YEAR(C5)

Syntax

YEAR(date)

  • date - The date from which to calculate the year.

Examples

YEAR(DATE(2020,2,3)) returns the year component, which is 2020.
YEAR(C5) returns the year component of the date value contained in C5.

Notes

  • YEAR does not auto-convert number formats. Therefore, YEAR(10/10/2000) is interpreted as YEAR(0.05) , the quotient of 10 divided by 10 divided by 2000.
  • Problems can occur if dates are entered as text. You can use the DATE function to enter a date. For example, use DATE(2020,2,3) for the 3rd day of January, 2020. 
  • You can also use other functions which return a date object. (For example: DATEVALUE).