This is a migrated thread and some comments may be shown as answers.

Another Group By Month solution

1 Answer 198 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Digital Man
Top achievements
Rank 2
Digital Man asked on 07 Sep 2008, 08:59 PM
I glanced briefly at the telerik solution for grouping a report by month by using a custom DateTime object. I then decided to just try adding a column to my select command that would would return the month/year as a string as in:

RIGHT('00' + CAST(DATEPART(mm, TestDate) AS varchar(2)), 2) + CAST(DATEPART(yyyy, TestDate) AS varchar(4))

example: 092008

I then grouped by this and seems to work fine.

1 Answer, 1 is accepted

Sort by
0
Chris Gillies
Top achievements
Rank 1
answered on 08 Sep 2008, 09:22 AM
Hey Dan,

Can you point me to the original solution you were looking at?

Thanks!
Tags
General Discussions
Asked by
Digital Man
Top achievements
Rank 2
Answers by
Chris Gillies
Top achievements
Rank 1
Share this question
or