Syntax
DATETIME TIME_ROUND(DATETIME expr, INT period)
DATETIME TIME_ROUND(DATETIME expr, INT period, DATETIME origin)
TIME
:SECOND
,MINUTE
,HOUR
,DAY
, ,MONTH
,YEAR
Returns the upper/lower bound of expr
.
period
specifies how manyTIME
units, the default is1
.- specifies the start time of the period, the default is
1970-01-01T00:00:00
, the start time ofWEEK
is Sunday, which is1970-01-04T00:00:00
. Could be larger thanexpr
.