TIME_TO_SEC()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns a time value converted into a count of seconds since midnight.
USAGE
TIME_TO_SEC(time)
Argument Name | Description |
---|---|
| 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_
EXAMPLES
SELECT TIME_TO_SEC('12:01:30');
+-------------------------+
| TIME_TO_SEC('12:01:30') |
+-------------------------+
| 43290 |
+-------------------------+
SELECT TIME_TO_SEC();