hi I have a date which is 2009-06-02 00:00:00.000 and i want to only group by month ..
how can change it ?!
hi I have a date which is 2009-06-02 00:00:00.000 and i want to only group by month ..
how can change it ?!
You may want to group by month, but have data that spans more than one year. In that case, I would do:
group by Year(MyDate), Month(MyDate)
use
group by MONTH(record_date)
see this question for more information :