SEC_TO_TIME()

Overview

Returns the time value derived from the number of seconds since midnight.

USAGE

SEC_TO_TIME(seconds)

Argument Name

Description

seconds

The number of seconds since midnight

DETAILS

SEC_TO_TIME() is a date-time function that returns a time value derived from the seconds argument (the number of seconds since midnight).

The return value is in the format hh:mm:ss.

The number of hours returned can exceed 23, with the maximum return value being 838:59:59. This return value corresponds to a seconds value of 3020399.

A NULL is returned if the argument is NULL.

For the opposite conversion, see TIME_TO_SEC().

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT SEC_TO_TIME(1234);
+-------------------+
| SEC_TO_TIME(1234) |
+-------------------+
| 00:20:34.000000   |
+-------------------+
SELECT SEC_TO_TIME(3020399);
+----------------------+
| SEC_TO_TIME(3020399) |
+----------------------+
| 838:59:59.000000     |
+----------------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES