Example
Return the seconds part of a datetime value:
sql
SELECT SECOND("2017-06-20 09:34:00.000023");
Definition and Usage
The SECOND() function returns the seconds part of a time/datetime (from 0 to 59).
Syntax
text
SECOND(datetime)
Parameter Values
| Parameter | Description |
|---|---|
| datetime | Required. The time or datetime to extract the second from |
Technical Details
| Works in: | From MySQL 4.0 |
|---|
More Examples
Example
Return the seconds part of a time value:
sql
SELECT SECOND("23:59:59");