You should consider using mysql's built-in DATE_FORMAT function.
Why pull data, parse it, and format it, when you can retrieve it formatted
the way you want in one call. Double/triple handling of data is a bad thing.


"Nyon" <[EMAIL PROTECTED]> wrote in message
001c01c1dfbd$a7403320$[EMAIL PROTECTED]">news:001c01c1dfbd$a7403320$[EMAIL PROTECTED]...
Hi,

I need to recall a date data in a MySQL database.
The column is set as "date timestamp(8)".
A sample of date is "20020409"

I use the PHP Date function to format it back to say "9th April 2002".
$date_formated = date($date, 'S M Y' );
However, it's still doesn't appear as formatted.

Anyone mind sharing their code to do this?

Nyon



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

Reply via email to