TIMESTAMPDIFF
Return the amount of time between two date or timestamp values.
Syntax
TIMESTAMPDIFF(unit symbol, giventime1 date or timestamp, givenTime2 date or timestamp) → integer
unit: The unit of the interval. Must be one of the following:
YEAR
,QUARTER
,MONTH
,WEEK
,DAY
,HOUR
,MINUTE
,SECOND
.giventime1: The first
DATE
orTIMESTAMP
(subtrahend).givenTime2: The second
DATE
orTIMESTAMP
(minuend).
Examples
TIMESTAMPDIFF example
TIMESTAMPDIFF example
TIMESTAMPDIFF example
TIMESTAMPDIFF example
Last updated