Grouping by MM/YYYY in report

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I want to group by MM/YYYY in a report but because I do a
datepart to get the MM and YYYY and then combine them, the
field now becomes a string. My sorting is then off 1/2003
is followed by 10/2003 instead of 2/2003. I tried
creating the field as double and storing it like yyyy.mm
but 0 in October gets cut off. I also tried dateserial
and defaulted the day to 1 but I don't want to display the
day when it shows on the report. Any suggestions??
 
Brian said:
I want to group by MM/YYYY in a report but because I do a
datepart to get the MM and YYYY and then combine them, the
field now becomes a string. My sorting is then off 1/2003
is followed by 10/2003 instead of 2/2003. I tried
creating the field as double and storing it like yyyy.mm
but 0 in October gets cut off. I also tried dateserial
and defaulted the day to 1 but I don't want to display the
day when it shows on the report. Any suggestions??

Add a GroupBy using YYYYMM and sort on that (you don't have to display it).
 
When you select the date field in the report's Sorting And Grouping, the
lower pane of the dialog allows you to specify the interval. Date fields can
be grouped by month.
 
Back
Top