Date Difference
Calculate difference between two dates
What It Does
Date Difference calculates the time between two date columns in your chosen unit. Returns a number representing the difference.
How to Use It
Opening the Panel
Click the + button in the toolbar or press the operation picker, then search for "Date Difference". It's in the Date group.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
First date | Column select (date) | Yes | Start date column |
Second date | Column select (date) | Yes | End date column |
Unit | Select | Yes | day, week, month, year, hour, minute |
SQL generated under the hood
SELECT *, DATEDIFF('day', start_date, end_date) AS duration_days FROM data
Related Operations
- Extract Date Part - Extract year, month, day from a date
- Increment Date - Add/subtract time intervals