DateDiff
The DATEDIFF function returns the time between two dates.
Syntax
: dateDiff(date_part, start_date, end_date) Where startdate and enddate are valid date expressions and datepart can be one of the following:
Date part | Abbreviation |
---|---|
second | seconds, s |
minute | minutes, m |
hour | hours, h |
day | days, d |
month | month, M |
year | years, y |
Example
: dateDiff('month',2004-07-15,2004-04-03)Provide Feedback