Access DateDiff Function

Last updated: August 25, 2026.

The Access DateDiff function returns the number of specified interval boundaries between two date values.

Syntax

DateDiff(interval, date1, date2 [, firstdayofweek [, firstweekofyear]])
IntervalMeaning
yyyyYear
qQuarter
mMonth
dDay
wwCalendar week
h, n, sHour, minute, second

Query examples

DaysOpen: DateDiff("d", [OpenedAt], Date())
MinutesElapsed: DateDiff("n", [StartedAt], Now())
FullYears: DateDiff("yyyy", [BirthDate], Date())

DateDiff("yyyy", ...) counts year boundaries; it does not automatically calculate a person’s completed age. Week calculations also depend on the optional first-day and first-week arguments. See Microsoft’s DateDiff reference for all interval rules.

Need to replace an Access database application? Explore a web-based migration path with PHPRunner.

admin

admin

Leave a Reply

Your email address will not be published.