Google Sheets and Excel have proved to be the best editors while dealing with dates and calculations. Do you know you easily extract a year from a given date in Google Sheets and Excel? These two tools allow users to quickly get the year from date without having to type manually. However, many people are unaware of this feature. This article will discuss ways and methods of extracting a year from a given date.
To extract the year from the date in Google Sheets
Table of Contents
Here are the methods that can be used:
Using the year function
The year function is an in-built function that can be used to extract the year from the date cell. Here are the steps to follow while using this method:
1. Visit the Google account and log in using your email detail (That is, https://www.google.com/account).
2. From the Google Apps, click on the Sheets icon and select the existing Sheet.
3. Locate the cell that contains the date you want to extract the year.
4. Click on an empty cell, and type this formulae = YEAR (
5. Select the cell that contains the date, and close the formula’s function. That is, =YEAR (A2)
6. Finally, hit the Enter button.
Using the Right function
Steps:
1. Click on an empty cell, and type this formulae = RIGHT (
2. Select the cell that contains the date, and enter the number of characters. That is, =Right (A2, 4)
3. Finally, hit the Enter button.
Using the Text function
Steps to follow:
1. Click on an empty cell, and type this formulae = TEXT (
2. Select the cell that contains the date, and type triple y. That is, =TEXT (A2, “yyy”)
Note:
YY- This will return the year in two digits.
YYY or YYY – This will return the year in full.
3. Finally, hit the Enter button.
Using the Custom date tool
Steps:
1. Click on the cell that contains the date you want to extract the year.
2. Click on the Format tab on the menu, and hover the cursor over the Number button.
3. Choose the Custom date and time option from the drop-down menu.
4. From the dialogue box, choose only to show the year.
5. Finally, hit the Apply button.
To extract the year from the date in Excel
Methods to be discussed:
Using the Year function
Steps:
1. Click on an empty cell, and type this formulae = year (
2. Select the cell that contains the date, and close the formula’s function. That is, =YEAR (A2)
3. Finally, hit the Enter button.
Using the Text function
Steps:
1. Click on an empty cell, and type this formulae = TEXT (
2. Select the cell that contains the date, and type triple y. That is, =TEXT (A2, “yyy”)
3. Finally, hit the Enter button.
Using the Right function
Steps:
1. Click on an empty cell, and type this formulae = RIGHT (
2. Select the cell that contains the date, and enter the number of characters. That is, =Right (A2, 4)
3. Finally, hit the Enter button.