RE: [PHP] Problem with date_format() in indirect MySQL query...
| From: | Mark Roedel | Date: | Thu, 01 Nov 2001 14:23:55 +0000 |
| Subject: | RE: [PHP] Problem with date_format() in indirect MySQL query... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73155@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Ryan Fischer [mailto:ryan@gigabee.com]
> Sent: Thursday, November 01, 2001 5:37 AM
> To: php-general@lists.php.net
> 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