Menu
Amazon QuickSight
User Guide

dateDiff Function

dateDiff returns the difference in days between two date fields.

Syntax

Copy
dateDiff(date, date)

Arguments

dateDiff takes two dates as arguments.

date

A date field or a call to another function that outputs a date.

Return Type

Integer

Example

The following example returns the difference between two dates.

Copy
dateDiff({order date}, {ship date})

For the field values:

Copy
order date ship date ============================== 01/01/14 01/05/14 09/13/16 09/20/16

The following values are returned:

Copy
4 7