RE: [PHP] Tried that..
| From: | David Freeman | Date: | Sun, 11 Aug 2002 02:04:30 +0000 |
| Subject: | RE: [PHP] Tried that.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111994@lists.php.net to get a copy of this message | ||
> I've tried that, but as usual rtfm doesn't help me. I need
> concise examples
> :(
>
> How would I write this basic select query to get the date in
> my format
> (Saturday, August 10th, 2002)?
> SELECT datum FROM news_items
> (where "datum" is the date-stamp in "YYYY-MM-DD" format)
Rasmus is right, this is a database question...
Anyway... Something like this should get you close...
SELECT DATE_FORMAT(datum, '%e %b %y') AS my_formatted_date FROM
news_items WHERE whatever = something_else
The key here is DATE_FORMAT(column, 'format') AS whatever
You'll need to insert your own column name and get the format stuff from
the mysql manual (as previously noted, chapter 6.4.something will do
that).
CYA, Dave