Is there an easy way to display the epoch time given by time() in a human
readable format? Basically, if I do $time = time(); and the insert that
data into my mysql database and then pull that information out again how
do I make it look like 2003-03-13 or a variant of that?

If you are pulling a date/time out of a MySQL database, use MySQL's DATE_FORMAT() function to format the value. For that matter, you can use MySQL's NOW() function (or others) when inserting the time.


Otherwise, just in PHP, you can use the DATE() function to format dates.

Larry


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to