Blog

# How to Get Year From Date in Excel?

Are you looking for a quick and easy way to get the year from a date in Excel? Knowing how to do this can be very useful when you need to sort data by year or calculate a difference between two dates. In this article, we’ll provide step-by-step instructions on how to get the year from a date in Excel. So if you’re ready to learn how to quickly and easily get the year from a date in Excel, keep reading!

## How to Extract Year From a Date in Excel

In Excel, finding the year of a given date can be done in a number of ways. Whether you’re using a formula or a function, extracting the year from a date in Excel is relatively straightforward and simple. In this article, we’re going to explore a few different methods to get the year from a date in Excel.

### Using the YEAR Function

The YEAR function is an in-built function in Excel that returns the year of a given date. The syntax of the YEAR function is as follows: =YEAR(date). The “date” argument is the date from which you want to extract the year. The function will then return the year of the given date as a four-digit number.

For example, if the date is “5/12/2020”, the YEAR function will return “2020”. If the date is “31/12/2020”, the function will return “2020”. The YEAR function is very useful for extracting the year from a date in a single cell.

### Using the TEXT Function

The TEXT function is another in-built function in Excel that can be used to extract the year from a date. The syntax of the TEXT function is as follows: =TEXT(date,”yyyy”). The “date” argument is the date from which you want to extract the year. The “yyyy” argument is the format code for the year. The function will then return the year of the given date as a four-digit number.

For example, if the date is “5/12/2020”, the TEXT function will return “2020”. If the date is “31/12/2020”, the function will return “2020”. The TEXT function is very useful for extracting the year from a date in a single cell.

### Using the DATEVALUE Function

The DATEVALUE function is another in-built function in Excel that can be used to extract the year from a date. The syntax of the DATEVALUE function is as follows: =DATEVALUE(date). The “date” argument is the date from which you want to extract the year. The function will then return the year of the given date as a four-digit number.

For example, if the date is “5/12/2020”, the DATEVALUE function will return “2020”. If the date is “31/12/2020”, the function will return “2020”. The DATEVALUE function is very useful for extracting the year from a date in a single cell.

### Using the YEARFRAC Function

The YEARFRAC function is another in-built function in Excel that can be used to extract the year from a date. The syntax of the YEARFRAC function is as follows: =YEARFRAC(date, today). The “date” argument is the date from which you want to extract the year. The “today” argument is the current date. The function will then return the year of the given date as a four-digit number.

For example, if the date is “5/12/2020”, the YEARFRAC function will return “2020”. If the date is “31/12/2020”, the function will return “2020”. The YEARFRAC function is very useful for extracting the year from a date in a single cell.

### Using the DATE Function

The DATE function is another in-built function in Excel that can be used to extract the year from a date. The syntax of the DATE function is as follows: =DATE(year, month, day). The “year” argument is the year of the date from which you want to extract the year. The “month” argument is the month of the date. The “day” argument is the day of the date. The function will then return the year of the given date as a four-digit number.

For example, if the date is “5/12/2020”, the DATE function will return “2020”. If the date is “31/12/2020”, the function will return “2020”. The DATE function is very useful for extracting the year from a date in a single cell.

### Q1. What is the easiest way to get the year from date in Excel?

A1. The easiest way to get the year from date in Excel is to use the YEAR() function. This function takes a date as an argument and returns the year in a 4-digit format. For example, if you have a cell with a date value in it, you can enter the formula =YEAR(A1) in another cell, where A1 is the cell containing the date, to get the year from the date.

### Q2. How do you use the YEAR() function in Excel?

A2. To use the YEAR() function in Excel, enter the function followed by the date you would like to find the year for in parenthesis. For example, =YEAR(A1). This will return the year for the date in cell A1. You can also enter a date directly into the function if you would like. For example, if you would like to find the year for the date 5/18/2019, you would enter =YEAR(5/18/2019).

### Q3. What other functions can I use to get the year from a date in Excel?

A3. In addition to the YEAR() function, there are also other functions you can use to get the year from a date in Excel. The TEXT() function can be used to convert a date to text and then you can use the LEFT() function to extract the first 4 digits of the text, which will be the year. You can also use the DATEVALUE() function to convert a date to a serial number and then use the INT() function to extract the year from the serial number.

### Q4. What if the year is in a different format than I want it to be?

A4. If the year is in a different format than you want it to be, you can use the TEXT() function to convert it to text and then use the MID() function to extract the year from the text. For example, if you have a date in the format mm/dd/yyyy and you want to get the year in the format yyyy, you can use the formula =MID(TEXT(A1,”yyyy”),3,4), where A1 is the cell containing the date. This will return the year in the format yyyy.

### Q5. What if I have a date in a different format than Excel recognizes?

A5. If you have a date in a format that Excel does not recognize, you can use the DATEVALUE() function to convert it to a serial number. You can then use the INT() function to extract the year from the serial number. For example, if you have a date in the format mm/dd/yy and you want to get the year in the format yyyy, you can use the formula =INT(DATEVALUE(A1)) where A1 is the cell containing the date. This will return the year in the format yyyy.

### Q6. How can I get a list of all the years from a list of dates in Excel?

A6. To get a list of all the years from a list of dates in Excel, you can use the array formula =UNIQUE(YEAR(A1:A10)), where A1:A10 is the range of cells containing the dates. This will return a list of all the unique years from the list of dates. You can also use the COUNTIF() function to count the number of times each year appears in the list of dates. For example, =COUNTIF(A1:A10,YEAR(A1)) will count the number of times the year from cell A1 appears in the range of cells A1:A10.

### Excel Help – Extract Year & Month Name With Formula

Excel is an incredibly powerful tool and getting a year from a date using its functions is a piece of cake. By using the YEAR, YEARFRAC, and EDATE functions, you can easily extract the year from any date in Excel. All of these functions are simple to use and can be used to quickly and accurately get the year from a date with minimal effort.

Related Articles