# YEAR

Formulas / YEAR
Retrieve the year from a date.
`YEAR(serial_number)`
• serial_number - required argument to find a date

## Examples

• `=YEAR("23-Aug-2012")`

The YEAR function is used to return the year portion of a given date. To illustrate this, let's look at the example above. This would return the year 2012.

• `=YEAR(A1)`

Another example is to use the YEAR function with a cell reference. Suppose cell A1 contains the date "11-May-2019". This can be used in the YEAR, and would return the year 2019.

• `=DATE(YEAR(A1),1,1)`

The YEAR function can also be used in the DATE function to return the first day of the year. This can be done by using the YEAR function as an argument in the DATE function, as seen in the example . This would return the first day of the same year as the date given in cell A1.

## Summary

The YEAR function returns the year from a given date. This date should be entered using the DATE function and Sourcetable calculates the date as a sequential serial number.

• The YEAR function can be used to extract a year number from a date into a column and feed that value into another formula. The DATE function can be used with the YEAR function to get a month number from a date.

What is the YEAR function?
The YEAR function is a DATE function in Sourcetable. It returns the year from a date argument.
What does the YEAR function do?
The YEAR function takes a date as a parameter and returns an integer representing the year of the date argument.
What are some examples of using the YEAR function?
The YEAR function can be used to extract the year from a date and store it in a cell. For example, if the date 11/15/2021 is written in cell A1, the YEAR function =YEAR(A1) can be used to extract and store the year (2021) in another cell.
What are some other uses of the YEAR function?
• The YEAR function can be used to compare two dates and calculate the difference in years.
• The YEAR function can be used to compare two dates and determine if they are in the same year.
• The YEAR function can be used to filter data by year.