Convert Unix timestamp into human readable date using MySQL
Use FROM_UNIXTIME()
:
SELECT FROM_UNIXTIME(timestamp) FROM your_table;
See also: MySQL documentation on FROM_UNIXTIME()
.
What's missing from the other answers (as of this writing) and not directly obvious is that from_unixtime
can take a second parameter to specify the format like so:
SELECT from_unixtime(timestamp, '%Y %D %M %H:%i:%s')FROM your_table