Skip to main content

ROUND_DATETIME

Rounding of a date and time to nearest minutes interval

Example Usage​

ROUND_DATETIME('2022-01-01 12:52:00', 10, 3) -> '2020-01-01 12:50:00'

Overview​

Function signature
ROUND_DATETIME(value, roundto, upafter)

Category
Date

Return data type
datetime

Arguments​

NameDataTypeList Options                          Description
valuedatetimeinput time to round
roundtointround to the nearest minutes of this interval
upafterintnumber of minutes into the round period for which to round to the next value