[solved] selecting certain months
Posted: Mon Nov 24, 2003 12:42 am
Okay, I asked this question ealier before and got it but now I'm using a different approach for the date. I have a MySQL timestamp, and I want to select the months from it.
Before:
then I could do a:
but now i have the timestamp for the date:
i tried to:
but that threw up an error when i tried it in phpmyadmin. any ideas?
thanks,
-Nay
Before:
Code: Select all
news | date | month | comments
yay! | 9-11 | jan | none
yay! | 9-11 | jul | none
yay! | 9-11 | dec | noneCode: Select all
select distinct month from newsCode: Select all
news | date | comments
yay! | 121020031155 | none
yay! | 111220031155 | none
yay! | 101120031155 | noneCode: Select all
SELECT DATE_FORMAT( date, '%m-%y' ) AS formatted_date DISTINCT formatted_date
FROM newsthanks,
-Nay