DateDiffDays
Returns number of days from first date to second date.
Syntax
DateDiffDays(from_date, to_date)
Arguments
from_date | MDX expression that returns a date. |
---|---|
to_date | MDX expression that returns a date. |
Examples
Following example calculates how many days the issue spent in the status since the last status transition.
DateDiffDays([Measures].[Issue status updated date], Now())
See example report Issues days in current status overview in our demo account. The formula above is used within any calculation in this report to count days spent in the status. The calculation is used in several scenarios to detect issues with age in status by particular interval or an average time spent in the status.
See also
- The above is an example how to use the DateDiffDays function. Note that more efficient way of calculating issues due in various age intervals would be to use the Age intervals dimension.
- Function DateDiffWorkdays which returns number of working days between two dates.