2.64.3.50 Scalar Function: DateDiff

The following are the arguments, types, and specification of the DateDiff scalar function.

Function

Arguments

Type

Specification

DateDiff

Return

Integer

The difference between the Start date and time and the End date and time, in units of Interval. Negative if the Start date and time is after the End date and time.

Interval

String

The units over which to compute the date and time difference.

MUST be one of the following: "Year", "Quarter", "Month", "Day", "Hour", "Minute", "Second", "Week".

MUST be a Literal element.

Start

DateTime or Time

The start date and time.

End

DateTime or Time

The end date and time.

MUST have the same data type as Start.