YEAR


Returns the year of a given date.

Syntax:

YEAR(date)

returns the year of date as a number. date may be text or a date-time serial number.

Example:

YEAR("2021-12-01")

returns 2021.

YEAR(A1)

where cell A1 contains the date 1 Dec 2021 as a date-time serial number, returns 2021.


Application:

Here's an application of YEAR function:


Scenario: Analyzing Sales Data by Year

Imagine you have a sales dataset with transaction dates, and you want to analyze sales performance year by year. The YEAR function can help you quickly pull out the year for each transaction.


Table:

Order ID

Order Date

Sales Amount

Order Year

A
B
C
D
1
101
1/15/2023
$150.00
2023
2
102
3/22/2023
$200.50
2023
3
103
2/10/2024
$300.00
2024
4
104
7/1/2023
$120.75
2023
5
105
5/18/2024
$250.00
2024
6
106
1/5/2025
$400.00
2025

Enter the Formula: In the first data cell of your new "Order Year" column (e.g., cell D1), type the following formula:
YEAR(B1)

  • YEAR is the function.
  • B1 refers to the cell containing the first "Order Date" (August 15, 2023).




This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof