Re: Fw: Formatting dates (from MySQL)
| From: | Marco Tabini | Date: | Sat, 14 Dec 2002 20:00:46 +0000 |
| Subject: | Re: Fw: Formatting dates (from MySQL) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128294@lists.php.net to get a copy of this message | ||
You should be able to use strtotime() to transform the datetime string
into a UNIX timestamp, which you can then format back using date().
However, this is a very circuitous way--either use SQL to format it or,
if your DBMS supports it, have it returned already as a UNIX timestamp.
The actual SQL commands depend on which DBMS you actually use.
Marco
--
------------
php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming
Check us out on the web at http://www.phparch.com!