Skip to main content
Version: 0.7.0

toSecond

Converts a date with time to a UInt8 number containing the number of the second in the minute (0-59).

Syntax

toSecond(expr)

Arguments

ArgumentsDescription
exprdatetime

Return Type

UInt8 datatype.

Examples

mysql> select toSecond(now());
+-----------------+
| toSecond(now()) |
+-----------------+
| 14 |
+-----------------+

mysql> select toSecond(toDateTime(1630812366));
+----------------------------------+
| toSecond(toDateTime(1630812366)) |
+----------------------------------+
| 6 |
+----------------------------------+