Skip to main content
YEAR

Retrieves the year component from a given date or datetime

Updated over a week ago

Description

The YEAR() function extracts and returns the year component from a given date or datetime. This is useful for date-based analysis, organizing data by years, or generating annual reports.

Syntax

YEAR(date)

Output

integer

Variables

  1. date: The date or datetime from which you want to extract the year component.

Example

YEAR(`Sale Date`)

Transaction

Sale Date

YEAR

Transaction A

2023-09-10

2023

Transaction B

2022-08-25

2022

Transaction C

2021-09-01

2021

Did this answer your question?