Skip to main content

TO_START_OF_SECOND

Rounds down a date with time to the start of the second.

Syntax

to_start_of_second(expr)

Arguments

ArgumentsDescription
exprdatetime

Return Type

Datetime object, returns date in “YYYY-MM-DD hh:mm:ss” format.

Examples

SELECT to_start_of_second(now());;
+------------------------+
| to_start_of_second(now()) |
+------------------------+
| 2022-04-13 13:53:47 |
+------------------------+