Quarterly Date Sorting

  • Thread starter Thread starter danyellglfer
  • Start date Start date
D

danyellglfer

I have a report that has weeks from Jan-Dec.
I can get the report to group by Quarter... HOWEVER, WHen I try and show the
Quarter - it shows the FIrst Month in the QUarter not the last. How do I get
the last Quarter to show? For Instance I'd like the Report to say Quarter
Ending March 2007.
 
It would be helpful it you posted the code you are using now to get the first
month of the quarter, then we could modify it to return the last month.
 
I'm not sure what you mean by "code" but these are the fields and how I
sorted the report:

Week Ending - Ascending Sorted
Code - Ascending Sorted
Job Name - Ascending Sorted
 
This expression returns the last date for a quater for a give date:
DateSerial(Year(Date), (((Month(Date) -1) \ 3) + 1) * 3 + 1, 0)

So If Week Ending is the date you want to use, it would be
DateSerial(Year([Week Ending]), (((Month([Week Ending]) -1)\3) + 1) * 3 + 1,
0)
 
Back
Top