RE: [PHP-DB] Displaying Date from Value in MySQL DB
| From: | Tyler Replogle | Date: | Tue, 20 Apr 2004 21:36:29 +0000 |
| Subject: | RE: [PHP-DB] Displaying Date from Value in MySQL DB | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33988@lists.php.net to get a copy of this message | ||
You could always make your own function. If you need help with that i would be glad to help there too.
From: "Justin @ Dreaming in TO" <justin@dreaminginto.com> To: php-db@lists.php.net Subject: [PHP-DB] Displaying Date from Value in MySQL DB Date: Tue, 20 Apr 2004 14:27:30 -0400 Hey All, Looking to try to figure at small problem. This is the SQL query I am using to show the next event on a page: SELECT ditoevents.eventstatus, ditoevents.eventdate, DATE_FORMAT(ditoevents.eventdate, '%a, %b %d %Y'), ditoevents.eventtime, ditoevents.eventlocation, ditoevents.topic, ditoevents.presenter FROM ditoevents WHERE ditoevents.eventstatus = 'next' This is the structure of the table in the MySQL db: CREATE TABLE ditoevents ( ID char(3) NOT NULL default '', eventID char(2) NOT NULL default '', eventstatus varchar(4) NOT NULL default '', eventdate date NOT NULL default '0000-00-00', eventtime time NOT NULL default '00:00:00', eventlocation text NOT NULL, topic text NOT NULL, presenter text NOT NULL ) TYPE=MyISAM; The problem is, the date value that's being pulled from the DB is being displayed as 2004-05-12. I would like the date to be displayed as, Wednesday, May 12th, 2004. How do I do this with PHP. I looked at some of the date functions, and I'm a bit confused. Thanks, Justin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_________________________________________________________________ Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/