FLOOR with a DateTime argument
- Last UpdatedDec 19, 2022
- 1 minute read
The function returns the largest time prior to the specified time to the precision specified (timeUnit).
Syntax
DateTime FLOOR(x DateTime)
DateTime FLOOR(x DateTime, timeUnit TimeUnit)
TimeSpan FLOOR(x TimeSpan)
TimeSpan FLOOR(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 FLOOR with a numeric argument.