Group Date Field
Posted: Fri May 26, 2006 9:13 am
Hi,
I necessary to create one query that it catches the field date of mysql and groups per years and months.
I go to explain better what I need:
I have that to create a list that only consists the months and the years of a table of news.
in this table I the same have some entrances of dates with different days of month, year.
Ex.
2006-01-01
2006-01-02
2006-01-03
2006-02-01
2006-02-02
2006-02-03
...
and i need to output only
2006-01
2006-02
....
Some one cam help-me...thanks
I necessary to create one query that it catches the field date of mysql and groups per years and months.
I go to explain better what I need:
I have that to create a list that only consists the months and the years of a table of news.
in this table I the same have some entrances of dates with different days of month, year.
Ex.
2006-01-01
2006-01-02
2006-01-03
2006-02-01
2006-02-02
2006-02-03
...
and i need to output only
2006-01
2006-02
....
Some one cam help-me...thanks