webCOMAND

SECOND()

Return the second part of a time or timestamp as an integer from 0-59.

Prototype

integer SECOND(mixed $timestamp)

Parameters

  • timestamp - A time ("HH:MM:SS") or timestamp ("YYYY-MM-DD HH:MM:SS") followed by optional decimal and microseconds

Return

The second portion of a time or timestamp, or NULL if there is an error, such as an invalid timestamp.

Example

SELECT OID, SECOND('12:05:22') AS Second FROM User

Related

HOUR(), MINUTE(), MICROSECOND()