MySql :: How to convert UNIX_TIMESTAMP data into DATE data in queries

There might be situations where you would want to convert a data stored in UNIX_TIMESTAMP format (may be by your code or else) to human readable DATE format of mysql, then just run this query-
SELECT FROM_UNIXTIME(time_stamp_fieldname) as any_ FROM table;

and see the results in a new table format, every record's timestamp data will be changed in Date data.
try it.
n
enjoy!
:-)

0 comments: