MariaDB Unix Time Conversion Functions:

MariaDB [test]> select unix_timestamp('2019-05-21 09:00:00');
+---------------------------------------+
| unix_timestamp('2019-05-21 09:00:00') |
+---------------------------------------+
|                            1558400400 |
+---------------------------------------+
1 row in set (0.001 sec)

 

MariaDB [test]> select from_unixtime(1558400400);
+---------------------------+
| from_unixtime(1558400400) |
+---------------------------+
| 2019-05-21 09:00:00       |
+---------------------------+
1 row in set (0.001 sec)

 

arrow
arrow
    全站熱搜

    DanBrother 發表在 痞客邦 留言(0) 人氣()