woolyg Posted July 21, 2007 Share Posted July 21, 2007 Hi, If I have a datetime field that saves info in the format 2007-07-21 16:59:36, and use <?php $result = mysql_query ("SELECT table.date_added FROM table"); while ($row = mysql_fetch_array($result)) { $date = $row['date_added']; echo $date; } How can I format the info that's been outputted from the query to 'Saturday 21st July 2007 16:59:36' ? It's eluding me! Any help appreciated, Woolyg. Quote Link to comment Share on other sites More sharing options...
Barand Posted July 21, 2007 Share Posted July 21, 2007 $date = $row['date_added']; echo date('l jS F Y H:i:s', strtotime($date)); Quote Link to comment Share on other sites More sharing options...
woolyg Posted July 22, 2007 Author Share Posted July 22, 2007 Thank a million Barand. Perfect, I'll note this one down - Woolyg. 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.