View Full Version : Grouping Dates in my report.


keikon1234
01-05-2005, 12:37 PM
Hi,

I'm wanting to do a bar graph in my report showing salary progression in year increments.

Using the chart wizard for my access report, I can't seem to figure out how I can group the dates any other way than the predefined groups (i.e. group by year, month, week, etc...). I'm wanting to group salary increases by the British financial year that they are received (i.e. 01 April to 31 March) and not the usual year dates of 1 Jan to 31 December.

Help! What do I need to do? Is there another way? :confused:

Thanks for your help in advance!

Rich
01-05-2005, 12:55 PM
Create your own Function and use that in your query
Public Function FinancialYear(dDate As Date) As Integer
FinancialYear = Year(dDate) - IIf(dDate < DateSerial(Year(dDate), 4, 1), 1, 0)
End Function