ROUND with a DateTime argument
- Last UpdatedDec 19, 2022
- 1 minute read
The function returns the time stamp (x) rounded to the nearest second or to the precision specified (timeUnit).
Syntax
DateTime ROUND(x DateTime)
DateTime ROUND(x DateTime, timeUnit TimeUnit)
Time ROUND(x TimeSpan)
Time ROUND(x TimeSpan, timeUnit TimeUnit)
Arguments
-
x
Must be DateTime or TimeSpan.
-
timeUnit
The following are valid precision values: day, hour, minute, second, millisecond, microsecond, or nanosecond.
Note: The function also works with a numeric argument. For more information, see ROUND with a numeric argument.