Cheat Sheets/Power Apps/DateDiff
Power Fx function

DateDiffPower Fx function reference

Span between two dates.

Syntax

powerfx
DateDiff( StartDate, EndDate [, Unit ] )

Examples

powerfx
DateDiff(StartDate, EndDate, TimeUnit.Days)
A number
powerfx
DateDiff(ThisItem.Created, Now(), TimeUnit.Days)
powerfx
DateDiff(StartDate, EndDate, TimeUnit.Hours) / 24

Common mistakes & gotchas

Related Power Fx functions

From Date & time

Used in these tutorials

← Back to the Power Apps (Power Fx) cheat sheet