---
title: YEAR
description: Learn how to use the YEAR function to extract and analyze year values from dates for calculated columns, enabling efficient data analysis.
---
import { Aside, Steps } from '@astrojs/starlight/components';

# YEAR

The YEAR function in Infoveave is used to extract the year from a given date.

## Applicable to

Calculated Columns


## Return Value

The YEAR function returns the year value as an integer for a given date.

## Remark

* The function is useful for extracting the year from dates for analysis, such as grouping data by year, performing year-over-year comparisons, and filtering data by year.
* The YEAR function returns “Invalid Date” on null or blank values.

## Syntax

```
WEEKDAY(<expression>)
```

<br/>

<Aside>
You can call in the system defined date function start date and end date as `@StartDate` and `@StartDate` respectively.
</Aside>

<br/>

## YEAR in Calculated Columns

**Instructions**

Write the YEAR function. For instance

```
YEAR(<expression>)
```
<Steps>
1. Replace `<expression>` with the start period. You can also call in `@StartDate` and `@EndDate` function.
2. To learn how to add calculated columns in Infoveave, visit the section [Calculated Columns](/studio-v8/datasources/calculated-columns-datasource/).
</Steps>

<br/>

**Example**

Suppose you want to create a column that returns the year value based on the column SALES DATE, you can use the YEAR function as follows

```
YEAR(DATEVALUE(VALUE([Sales Date])))
```

<br/>

<Aside type="tip">
When using the DATE function within WEEKDAY, you do not need to include the function DATEVALUE in your formula.

For example

```
YEAR((DATE(2024, 05, 01)))
```

will return 2024.
</Aside>
<br/>


