Link to home
Start Free TrialLog in
Avatar of jaguar5554
jaguar5554Flag for United States of America

asked on

Determine fiscal quarter based on date

I use the following expression in an MS Access Query to return the fiscal year for a given date: FYear: Year([Date])-IIf([Date]<DateSerial(Year([Date]),7,1),1,0). (Fiscal Year starts 7/1 and ends 6/30).
I am requesting assistance in writing an expression that will return the fiscal quarter for a given date. (i.e. 3/1/09 = 3Q2008).
Thank you in advance!
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Try this...

FYear: Format(DateAdd("m", -6, #6/30/2009#), "q""Q""yyyy")
Avatar of jaguar5554

ASKER

/thank you for the prompt response; unfortunately, the formula provided incorrectly returns the year 2008 to all dates (i.e 8/30/2007 = 1Q2007 and the formula returns 4Q2008)), and I do not believe it is calculating the quarter. Since the fiscal year starts 7/1, I believe the quarter should calculate as follows:
July Aug Sept = 1Q
Oct Nov Dec = 2Q
Jan Feb Mar = 3Q
Apr May Jun = 4Q

Again, any assistance is greatly appreciated! Thank you in advance...

ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect! Thank you so very much for your prompt and expert response.