Product Solutions Support
Try MemSQL

TO_SECONDS

Returns the number of seconds counting from year 0 to the input datetime.

TO_SECONDS ( dateobj )

Arguments

Return Type

Integer

Examples

memsql> select to_seconds('0000-01-01');
+--------------------------+
| to_seconds('0000-01-01') |
+--------------------------+
|                    86400 |
+--------------------------+

memsql> select to_seconds('2016-03-23 08:17:01');
+-----------------------------------+
| to_seconds('2016-03-23 08:17:01') |
+-----------------------------------+
|                       63625940221 |
+-----------------------------------+
Was this article useful?