Re: help formatting a mysql datetime variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, April 29, 2005 7:38 am, Bosky, Dave said:
> I'm trying to get a mysql datetime variable called $cdate formatted so
> it will print:
>
> Thursday, April 28, 2005 at 8:00:00 PM Eastern Time
>
> I tried the following but it's not perfect.
>
> ----------------------
> $newDate = date('I, F d, Y at g:i:s A T', $cdate);
> echo $newDate;
> ----------------------

http://php.net/date may help you.

You should also consider using MySQL's date_format function.

-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux