Dow name from Dow number
| From: | Alexander | Date: | Wed, 03 Jul 2002 10:25:34 +0000 |
| Subject: | Dow name from Dow number | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-20291@lists.php.net to get a copy of this message | ||
Hello,
in PostgreSQL I have this:
select date_part('dow', timestamp_name), count(id) from table_name group by
date_part('dow',timestamp_name);
and I get a record count list grouped by week days.
E.g.:
---+------
0 | 123
1 | 16
2 | 45
... |
6 | 9
I just want the day's name in the place of the day's number. E.g.
------+------
sun | 123
mon | 16
tue | 45
etc.
I use PHP 4.0
Thanks for help.