# 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://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FYelVDFCp5Pr6L1Es77vN%2Fimage.png?alt=media&#x26;token=af82a194-0942-4e97-bfaa-40ddd1d44773" alt=""><figcaption><p>Year function</p></figcaption></figure>
