DateDiff Function (Access custom web app)

DateDiff Function (Access custom web app)

Office 2013 and later

Returns the count of the specified date part boundaries crossed between the specified start date and end date.

Last modified: March 09, 2015

Applies to: Access 2013 | Office 2013

DateDiff(DatePart, StartDate, EndDate)

The DateDiff function contains the following arguments.

Argument name

Description

DatePart

Is the part of StartDate and EndDate that specifies the type of boundary crossed. Refer to the Remarks section for the list of valid settings.

StartDate

An expression that can be resolved to a Date/Time value. The Date argument expression, column expression, user-defined variable or string literal.

EndDate

An expression that can be resolved to a Date/Time value. The Date argument expression, column expression, user-defined variable or string literal.

The following table lists all valid DatePart arguments.

DatePart

year

quarter

month

dayofyear

day

week

hour

minute

second

millisecond

Show:
© 2016 Microsoft