Here is a sample query (from the Date and Time (http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html) section in the MySQL manual:
mysql> SELECT FROM_UNIXTIME(875996580);
-> '1997-10-04 22:23:00'
mysql> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),
-> '%Y %D %M %h:%i:%s %x');
-> '2003 6th August 06:22:58 2003'