How to convert from Unix timestamp to MySQL timestamp value?

MySQLMySQLi Database

MySQL converts Unix timestamp to timestamp data type value with the help of  FROM_UNIXTIME() function.

Example

mysql> Select FROM_UNIXTIME(1508622563);
+-----------------------------+
| FROM_UNIXTIME(1508622563)   |
+-----------------------------+
| 2017-10-22 03:19:23         |
+-----------------------------+
1 row in set (0.00 sec)
raja
Published on 19-Feb-2018 16:04:35
Advertisements