How to Extract Year From Date in Excel (3 Easy Ways)

Reader, meet this Excel shorty. Today this Excel shorty will teach you how to extract the year from a date in Excel. If you have a date entered in a recognizable format in Excel, it should be easy to get the separate elements of the date i.e. day, month, and year. The individual elements may be required for analysis, usage in functions, or calculations.

The element of the date that we’re focusing on today is the year and how to extract it. To single out the year from a date, we will show you 3 easy ways using the YEAR function, TEXT function, and a custom date format.

We will also tell you which method results in a number format and which results in a text format. But first, we would need a case example to work on.

How To Extract Year From Date In Excel

Example

Let's have a look at the example we are using in this tutorial for extracting years from dates:

How To Extract Year From Date In Excel

Our objective is to arrive at the founding year of a list of brands. As a reference, we have the founding dates in column C. Using the founding dates, we will extract the years.

Let's get extracting!

Using YEAR Function

Resulting format: Number

Indicative from its name, the YEAR function can be used to extract the year from a date in Excel. The YEAR function returns the year from a date between 1900 and 9999. Sounds like a good fit? Let's put it to the test:

=YEAR(C3)

Since the function was such a perfect fit, there's very little for us to do. The YEAR function has been entered with the date in cell C3 and it has extracted and returned the year 1976. The function is suitable to result in a number format as can be noted in the results below being right-aligned. These are the results using the YEAR function to return the years from the list of dates:

Using YEAR Function

Using TEXT Function

Resulting format: Text

The second method for extracting the year from a date is to use the TEXT function. The TEXT function converts a value into text format using formatting codes. Let's try applying a year code with the TEXT function and see if it can extract the year from a date:

=TEXT(C3,"YYYY")

The value allotted to the TEXT function is the date in C3. The formatting code for year is "YYYY" (the code is not case-sensitive and you can also use the code "YY" for a two-digit year). The TEXT function takes the date in C3 and converts it to the provided text format, returning only the year. Here are the years returned from the dates in column C using the TEXT function:

Using TEXT Function

The results from the TEXT function are right-aligned because of course, the TEXT function would return a text format.

Recommended Reading: How to Extract Month from Date

Using Custom Date Format

Resulting format: Number

Any readable date in Excel is already in a date format. So, to arrive at only the year, we need to customize the date format which can be done through the Format Cells settings. This method will overwrite the dates. If you want to keep the full dates, copy them to another column and format the copied dates. Our steps below to extract the year from a date using a custom date format also keeps the original dates:

  • Copy the dates to the column where you want to extract the years.

Using Custom Date Format

  • Select the copied dates and then select the dialog box launcher of the Home tab's Number group to open the Format Cells dialog box. Alternatively, use the Ctrl + 1 keys to launch the dialog box.

Using Custom Date Format

  • The Format Cells dialog box will open in the Number tab, showing the type of format of the selected cells:

Using Custom Date Format

  • Select Custom from the Category. In the Type field, enter the format code for year i.e. yyyy (the code is not case-sensitive).

Using Custom Date Format

  • When done, select the OK command button.

The years will be extracted from the dates with the custom date format. Select any cell and the Format bar will display "Custom", confirming the custom format:

Using Custom Date Format

The resulting years from the dates will be in a number format and right-aligned.

That was all from your Excel shorty of the day. We hope to have given you a good idea of how easy it is to get years from dates in Excel. You'll see more of shorty and his lengthy brothers as they try to help you along your regular Excellence. We’re signing off now, prepping for more trouble-sniping and Excel-tricking. Catch you then!

Compiled by - Content Studio

Thanks for reading. If you have found this article helpful show your love by sharing it with your friends & colleagues. All the tutorials on the Excel Trick are produced, reviewed, and fact-checked by a team of experts. You can check out our team here.