Finding the Number of Days Between Two Date Fields

There are a few ways you can get the number of days between two dates.

Using the Date Difference transform

See the help article How to use the Date Difference transform for more detailed instructions on using this transform.

Using the Calculated Columns transform

Use this formula:


If you are comparing two date fields without timestamps, then it will return a whole number. If one or both have a timestamp, then it will give you the number of days, hours, minutes, and seconds between the dates.


Using a SQL transform:

DATE_PART('day', "end_date" - "start_date") ?as? "days_between"
FROM? report


"end_date"::DATE - "start_date"::DATE AS "days_between"
FROM report
Was this article helpful?