[thelist] PHP/MySQL Date Format Help

Hassan Schroeder hassan at webtuitive.com
Wed Aug 4 09:36:25 CDT 2004


Rob Smith wrote:

> ever worked with php/mysql and the date format, you've probably seen the
> format like YYYY-MM-DD. 

> Can anyone offer a more cleaver way to reformat the YYYY-MM-DD into
> DD-MM-YYYY. Strangely enough I think I see the answer:

   SELECT DATE_FORMAT(myDateColumn, "%d-%m-%Y") FROM myTable;

Let the DB take care of the "cleaver" stuff :-)

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.




More information about the thelist mailing list