Link to home
Start Free TrialLog in
Avatar of howruaz9
howruaz9Flag for Canada

asked on

Fiscal Year Calculation

Hi experts,

I copied DatabaseMX's code as following from EE, used it in my database, it's so beautiful.
=DatePart("q",DateAdd("m",-3,[starttime])) & "-" & Year([starttime])-IIf(Month([starttime])>=3,0,1) & "/" & Year([starttime])-IIf(Month([starttime])>=3,0,1)+1
Now I'd like to have the year part only like 2009/2010, I'm assuming I took out the first part it would work, the code like the following:
=DatePart(Year([starttime])-IIf(Month([starttime])>=3,0,1) & "/" & Year([starttime])-IIf(Month([starttime])>=3,0,1)+1
But it says "The expression you entered is missing a closing parenthesis, bracket (]), or vertical bar (1).
Please advise.

Thank you!


Avatar of kmslogic
kmslogic
Flag of United States of America image

just put format(xxx, "yyyy") around the original code (insert code in place of xxx)
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
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
Avatar of howruaz9

ASKER

Thank you, cap. What can I say, you are genius.
I wish you a very happy holiday season!
Thank you, kmslogic and capricorn1. However cap's is working with no trouble. Wishing you all the best!!!