On 28 Apr 2002 at 14:48, Nick Wilson wrote:

> I have a field in MySQL db like this: date TIMESTAMP, 
> and it looks pretty regular like this: 20020428011911

If you've got the data in your database then do the date/time 
conversions as part of your sql query - it's more efficient.

Something like this would work:

$qid = db_query("SELECT DATE_FORMAT(TimeStamp, '%e %b %y') AS 
DispDate FROM sometable");

That will extract your timestamp as DD MMM YYYY from memory - have a 
look at the MySQL manual under the chapter on selects and date/time 
formatting and you'll get the complete list of '%x' options you can 

CYA, Dave

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

Reply via email to