Answers for "mariadb convert date to timestamp"

SQL
0

mariadb convert date to timestamp

MariaDB [(none)]> SELECT UNIX_TIMESTAMP();
+------------------+
| UNIX_TIMESTAMP() |
+------------------+
|       1269711082 |
+------------------+

MariaDB [(none)]> SELECT UNIX_TIMESTAMP('2007-11-30 10:30:19');
+---------------------------------------+
| UNIX_TIMESTAMP('2007-11-30 10:30:19') |
+---------------------------------------+
|                            1196436619 |
+---------------------------------------+

MariaDB [(none)]> select unix_timestamp("2007-11-30 10:30:19.123456");
+----------------------------------------------+ 
| unix_timestamp("2007-11-30 10:30:19.123456") | 
+----------------------------------------------+ 
| 1196411419.123456 | 
+----------------------------------------------+

MariaDB [(none)]> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP('2007-11-30 10:30:19'));
+------------------------------------------------------+
| FROM_UNIXTIME(UNIX_TIMESTAMP('2007-11-30 10:30:19')) |
+------------------------------------------------------+
| 2007-11-30 10:30:19                                  |
+------------------------------------------------------+
Posted by: Guest on July-03-2020

Code answers related to "mariadb convert date to timestamp"

Code answers related to "SQL"

Browse Popular Code Answers by Language