Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   date format (http://www.programmingforums.org/showthread.php?t=8790)

guess Mar 10th, 2006 4:46 AM

date format
 
while creating a data field in a table in mysql, I want to format the date like

dd/mm/yyyy . But I have to alter the table...Can anyone write the query here??

tempest Mar 10th, 2006 6:16 PM

Huh? You're going to have to give us more information, your namesake is very fitting btw...

Ooble Mar 10th, 2006 6:40 PM

When you select the date from the table, use the DATE_FORMAT function:
:

SELECT DATE_FORMAT(my_date, '%d %m %Y') FROM my_table


All times are GMT -5. The time now is 5:08 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC