# DATEDIFF

The DATEDIFF function returns the number of days between two input dates. The input dates should be in MM/DD/YYYY format. Node references are also accepted as arguments.

## Syntax

```javascript
datediff(fromDate, toDate)
```

## Arguments

fromDate – The start date of the interval.

toDate – The end date of the interval.

## Return value

Number

## Example

```javascript
datediff('8/16/2023', '8/2/2023')
```

Returns 14.

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