DATEDIFF

The DATEDIFF function returns the number of days between two dates. This function is commonly used to calculate durations, intervals, and date differences in reports and planning scenarios.

The input dates should be in MM/DD/YYYY format. References are also accepted as arguments.

Syntax

DATEDIFF(fromDate, toDate)

Arguments

  • fromDate: The start date of the interval.
  • toDate: The end date of the interval.

Return value

Returns the number of days between the two dates.

Example

DATEDIFF(Open Date, Close Date)

Calculates the number of days between the Open Date and Close Date fields. For example, if Open Date is 05/22/2026 and Close Date is 05/28/2026, the function returns 6.

Excel equivalent

DATEDIF

Enterprise planning, Integrated with PowerTable and Intelligence, native to Microsoft Fabric. Co Engineered with Lumel.
BUILT ON