<< Click to Display Table of Contents >>
DATEDIFF |
Returns how many periods of the time unit indicated by the @datePart parameter cross between the period indicated by the @startDate and @endDate parameters.
DATEDIFF(@datePart, @startDate, @endDate)
•@datePart: Indication of the date part, or time unit, that users want to return the time periods between @startDate and @endDate. For more information about possible values for this parameter, please check the DATEPART function
•@startDate: Initial date
•@endDate: Final date
NOTE |
The @datePart parameter of this function does not accept the values iso_week, isowk, or isoww, which are available only for the DATEPART function. |