> -----Original Message----- > From: Ryan Fischer [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 5:37 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Problem with date_format() in indirect MySQL query... > > > $res = $this->query("select *, date_format(thedate, 'M d, Y') as dt, > date_format(thedate, 'l:i p') as tm from thetable where foo = > '$bar'"); > > Every other query I've executed in this fashion, I've been > successful in retrieving the results. But, when I try doing > something with the date_format function, when I try to print > out the formatted date and time returned, I get the formats > instead. > > Does anyone have any idea why, and any idea what I can do to rectify > this? TIA! :)
Perhaps a quick re-read of the date_format() section of http://www.mysql.com/doc/D/a/Date_and_time_functions.html is in order? (Hint: the % characters mean something.) --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]