King Julien King Julien - 5 months ago 12
SQL Question

Convert Unix timestamp into human readable date using MySQL

Is there a MySQL function which can be used to convert a Unix timestamp into a human readable date? I have one field where I save Unix times and now I want to add another field for human readable dates.

Answer

Use from_unixtime:

SELECT
  from_unixtime(timestamp) 
FROM 
  your_table