TIME_TO_SEC()

Overview

Returns a time value converted into a count of seconds since midnight.

USAGE

TIME_TO_SEC(time)

Argument Name

Description

time

The time value to convert

DETAILS

TIME_TO_SEC() is a date-time function that returns the number of seconds since midnight for a time value.

A NULL is returned if the argument is NULL.

For the opposite conversion, see SEC_TO_TIME().

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT TIME_TO_SEC('12:01:30');
+-------------------------+
| TIME_TO_SEC('12:01:30') |
+-------------------------+
|                   43290 |
+-------------------------+
SELECT TIME_TO_SEC();

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