VeloDB Cloud
SQL Manual
Functions
date-time-functions
second

second

Description

Syntax:

INT SECOND(DATETIME date)

This function fetches the second information in the given date and returns a value ranging from 0 to 59.

The parameter is of DATE or DATETIME type.

Example

mysql> select second('2018-12-31 23:59:59');
+-----------------------------+
| second('2018-12-31 23:59:59') |
+-----------------------------+
|                          59 |
+-----------------------------+

Keywords

SECOND