Blog

# How to Get Year From Date in Excel?

If you are an Excel user, you know how useful it can be to manipulate and analyze data. Knowing how to get the year from a date in Excel is an essential skill that can help you work with dates more effectively. In this article, we’ll show you how to quickly and easily extract the year from a date in Excel, so you can make the most of your data. ## Using the YEAR Function to Extract the Year From a Date in Excel

The YEAR function in Excel makes it easy to get the year from a date. This function can be used to extract the year from a date and display it as a number in a cell. In this article, we’ll look at how to use the YEAR function to extract the year from a date in Excel.

The YEAR function is a simple function that takes a date as an argument and returns the year portion of that date as a number. For example, if you pass the date “1/1/2021” to the YEAR function, it will return the number 2021. To use the YEAR function, simply type the following formula into a cell:

### Syntax of YEAR Function

The syntax of the YEAR function is as follows:
YEAR(date)

Where “date” is the cell containing the date you want to extract the year from. For example, if the date is in cell A1, you would use the following formula:

YEAR(A1)

### Using YEAR Function in Excel

Once you’ve entered the formula into the cell, Excel will automatically calculate the year from the date and display it in the cell. To demonstrate, let’s take a look at an example.

#### Example 1: Extracting Year From a Date

Suppose we have the following date in cell A1:

1/1/2021

To extract the year from this date, we can use the following formula:

YEAR(A1)

This will return the number 2021, which is the year portion of the date.

#### Example 2: Extracting Year From a Date in Another Cell

Suppose we have the following date in cell B1:

2/2/2022

We can use the same formula to extract the year from this date, but this time we’ll use a cell reference instead of a literal date:

YEAR(B1)

This will return the number 2022, which is the year portion of the date in cell B1.

## Using the TEXT Function to Extract the Year From a Date in Excel

The TEXT function in Excel can be used to extract the year from a date. This function takes two arguments: a date and a format code. The format code “yyyy” will return the year portion of the date as a four-digit number. To use the TEXT function, simply type the following formula into a cell:

### Syntax of TEXT Function

The syntax of the TEXT function is as follows:
TEXT(date, “yyyy”)

Where “date” is the cell containing the date you want to extract the year from, and “yyyy” is the format code for the year. For example, if the date is in cell A1, you would use the following formula:

TEXT(A1, “yyyy”)

### Using TEXT Function in Excel

Once you’ve entered the formula into the cell, Excel will automatically calculate the year from the date and display it in the cell. To demonstrate, let’s take a look at an example.

#### Example 1: Extracting Year From a Date

Suppose we have the following date in cell A1:

1/1/2021

To extract the year from this date, we can use the following formula:

TEXT(A1, “yyyy”)

This will return the number 2021, which is the year portion of the date.

#### Example 2: Extracting Year From a Date in Another Cell

Suppose we have the following date in cell B1:

2/2/2022

We can use the same formula to extract the year from this date, but this time we’ll use a cell reference instead of a literal date:

TEXT(B1, “yyyy”)

This will return the number 2022, which is the year portion of the date in cell B1.

### Q1. What are the steps to get the year from a date in Excel?

Answer: To get the year from a date in Excel, you will need to use the YEAR function. This function takes a date or a date serial number as an argument and returns the year in a four-digit format. First, select the cell with the date. Then, enter the YEAR formula in an adjacent cell. The formula should be =YEAR(cell reference) and the cell reference should be the cell with the date. Finally, press Enter to get the year as the result.

### Q2. Does the YEAR function work with both dates and date serial numbers?

Answer: Yes, the YEAR function can work with both dates and date serial numbers. When using dates, the YEAR function will take the date and return the year in a four-digit format. When using date serial numbers, the YEAR function will take the serial number and return the year in a four-digit format.

### Q3. Is there an easier way to get the year from a date in Excel?

Answer: Yes, there is an easier way to get the year from a date in Excel. If the date is in the “dd/mm/yyyy” format, you can simply select the cell with the date and then use the RIGHT function to extract the year. The formula should be =RIGHT(cell reference,4) and the cell reference should be the cell with the date. Finally, press Enter to get the year as the result.

### Q4. What is the syntax for the YEAR function?

Answer: The syntax for the YEAR function is =YEAR(date). The argument “date” can be either a date or a date serial number. The function will return the year in a four-digit format.

### Q5. How do I get the year from a date in a different format?

Answer: To get the year from a date in a different format, you will need to use a combination of functions. First, you will need to use the TEXT function to change the date format. Then, you will need to use the LEFT or RIGHT function to extract the year. Finally, you can use the VALUE function to convert the extracted year back to a number.

### Q6. Are there any limitations to the YEAR function?

Answer: Yes, there are a few limitations to the YEAR function. The year must be in a four-digit format, and it must be between 1900 and 9999. The function will also return a #NUM! error if the argument is not a valid date or date serial number. Additionally, the function will return a #VALUE! error if the argument is not a valid date or date serial number.

Using Excel is a great way to quickly and easily get the year from a date. This tutorial has shown you how to do this by using the YEAR function, which is the most efficient method. No matter your experience level with Excel, you can now quickly and easily get the year from a date using this method.