---
url: /cube-functions/year.md
description: Returns the year component of a given date value.
---

# YEAR&#x20;

Returns the year component of a given date value.

```js
YEAR(date_value)
```

#### Parameters

* `date_value` - The date value from which to extract the year component.

#### Examples

```js
YEAR("2023-04-17")

```

**Result:** `2023`

**Note:** Returns the year component (2023) of the given date value (2023-04-17).

```js
YEAR(45033)

```

**Result:** `2023`

**Note:** Returns the year component (2023) of the given date value (45033), which represents 2023-04-17.
