I. Intro
You can use the YEAR function to obtain the year of a date, expressed as an integer.
II. About the function
- Formula: =YEAR(date value)
- Parameters:
- Date value: The date that you want to find the year for.
- Example:
- In a cell, enter =YEAR("2021-6-30") or =YEAR("2021/6/30"). Since the year is 2021, it will return 2021.
- Note:
- Use double quotation marks (") around the date in the formula.
- Set the cell format as either General or Number to ensure the correct results are displayed.
III. Steps
- Select a cell and click Formula in the toolbar, select All functions, and search for YEAR. You can also directly enter =YEAR in a cell.
- Enter the parameters (date value). The year, month, and day can be separated by either a hyphen (-) or a slash (/).
- Press Enter to display the result.
250px|700px|reset