DATEDIFF

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API Partial Data 360 Apps

Calculates the difference between two timestamps in the specified unit.

  • <field>: The unit of time to measure the difference in, such as day, month, or year.
  • <start>: The starting timestamp.
  • <end>: The ending timestamp.

Returns the difference as an integer.

  • Data 360 Apps: DATEDIFF doesn’t support the 'dow', 'doy', or 'localized_week' units.
  • Data 360 Apps: Fiscal date units (fiscal_week, fiscal_month, fiscal_quarter, and fiscal_year) aren’t supported.
  • DATEDIFF also supports fiscal date units, such as fiscal_week, fiscal_month, fiscal_quarter, and fiscal_year, along with fiscal calendar options. See Fiscal Calendar Options.

Measure the number of days between two dates.

Returns 10.