Re: mysql timestamp and php date
| From: | Jason Young | Date: | Mon, 30 Sep 2002 18:32:44 +0000 |
| Subject: | Re: mysql timestamp and php date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118247@lists.php.net to get a copy of this message | ||
In my pages, I just format the date from the SQL query:
"SELECT DATE_FORMAT(last_modified, '%m/%d/%Y %h:%i:%s %p') AS last_modified (...)"
Look up the DATE_FORMAT on mysql.com to get a list of the arguments.
Hope this helps!
-Jason
Bryan Koschmann - Gkt wrote:
Hello, I have a table with timestamps in mysql. The timestamps of course are in the format of 20020930014535 but I would like to format the output as this: date("l F jS H:i:s", $last_modified) What is the simplest way to do this? I see there are a few ways to convert it, but I was hoping for something easy (i.e. any built in functions that I missed). Thanks! Bryan