RE: [PHP-DB] mysql timestamps

From: Date: Mon, 24 Mar 2003 03:08:14 +0000
Subject: RE: [PHP-DB] mysql timestamps
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26580@lists.php.net to get a copy of this message
> how do i change the format of a MySQL timestamp (i.e hh:mm:ss DD/MM/YYYY > instead of YYYYMMDDhhmmss) retrieved from a mysql database with php? Use SELECT TO_UNIXTIME(your_column) FROM table ... And then use date() in PHP to format the result to your liking. Or, you can use DATE_FORMAT() in your query to format the result to your liking. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.db (#26580) next »