Re: convert date format-SOLVED

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

 



yeah i know but its used for other calculations thats why i format it with PHP!!
thanks anyway


Chris Ramsay wrote:

Angelo,

slightly OT , but as a point of interest perhaps, $row['date'] seemed
to indicate that your date comes out of a DB - you can date format
stuff with sql too - I find that useful sometimes...

With MySQL for example, if your date field is called 'myDate' you can
do the following in the query:

SELECT ... DATE_FORMAT(myDate, %d %b %Y) AS date ,....FROM.....

which formats $row['date'] as '25 mar 2005'...

rgds

chris




--

Angelo Zanetti
Z Logic
[c] +27 72 441 3355
[t] +27 21 464 1363
[f] +27 21 464 1371
www.zlogic.co.za

--
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