# YEAR

The YEAR function extracts the year from an input date. The input date should be in MM/DD/YYYY format. Node references are also accepted as arguments.

## Syntax

```javascript
year(date)
```

## Arguments

date - The date which is passed as input to the function.&#x20;

## Return value

Date

## Example

```javascript
YEAR('3/21/2023')
```

Returns 2023.

<figure><img src="https://content.gitbook.com/content/sB9HAei8v4FfKkH9M4gw/blobs/nmexHM3hGDqJrDbJq5Vq/image.png" alt=""><figcaption><p>Year function</p></figcaption></figure>
