Syntax
TO_SECONDS(expr)
Purpose
Returns the number of seconds since the start of the year 0 for the expr time or datetime expression. If expr is NULL, it returns NULL.
Examples
obclient> SELECT TO_SECONDS(950501);
+--------------------+
| TO_SECONDS(950501) |
+--------------------+
| 62966505600 |
+--------------------+
1 row in set
obclient> SELECT TO_SECONDS('2021-07-15');
+--------------------------+
| TO_SECONDS('2021-07-15') |
+--------------------------+
| 63793526400 |
+--------------------------+
1 row in set
