Convert timestamp to readable date/time PHP

Solution 1:

Use PHP's date() function.

Example:

echo date('m/d/Y', 1299446702);

Solution 2:

strtotime makes a date string into a timestamp. You want to do the opposite, which is date. The typical mysql date format is date('Y-m-d H:i:s'); Check the manual page for what other letters represent.

If you have a timestamp that you want to use (apparently you do), it is the second argument of date().