Coverting MySQL date to date("D M j") HOW
I want to out put the day of the week from MySQL I know date() can convert the timestam but mysql date is not a time stam so im not really sure how to show the date in more useful way
Can some on help me?
2007-02-09 ==> Wed, July 02, 2007
Thanks for help!
(1) Have your query return a UNIX timestamp value via the MySQL UNIX_TIMESTAMP() function.
(2) Use the PHP strtotime() function to convert the date string from your query into a timestamp, e.g.:
$formatted_date = date('D M j', strtotime($row['date']));
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Thanks a LOT!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)