aashcool198 Posted June 3, 2009 Share Posted June 3, 2009 Dates are stored in database in this format 2009/06/03 want that when i retrieve the data to my page the date should look like Wednesday June 03, 2009 please help! Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted June 3, 2009 Share Posted June 3, 2009 You need to use DATE_FORMAT. SELECT DATE_FORMAT(date, '%W %M %d, %Y') as date FROM table WHERE this='that' Quote Link to comment Share on other sites More sharing options...
cltn77 Posted June 3, 2009 Share Posted June 3, 2009 This will work: echo date('l F d Y',strtotime('2009/06/03')); Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted June 3, 2009 Share Posted June 3, 2009 This will work: echo date('l F d Y',strtotime('2009/06/03')); However, you may as well do it through MySQL. Quote Link to comment Share on other sites More sharing options...
aashcool198 Posted June 3, 2009 Author Share Posted June 3, 2009 Thanks to all of you. you are wonderful! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.