On Thu, 13 Mar 2003 12:07:33 -0500 "Tom Ray" <[EMAIL PROTECTED]> wrote:
> 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? > in php you would do: (see http://www.php.net/manual/en/function.date.php) $date = date('Y-m-d',time()); in mysql you would do: (http://www.mysql.com/doc/en/Date_and_time_functions.html) select date_format('%Y-%m-%d', field) from table where ...; -- Tom Woody Systems Administrator Don't throw your computer out the window, throw the Windows out of your computer! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php