Need help with IIF statement and dates

Sketchin

Registered User.
Local time
Yesterday, 23:11
Joined
Dec 20, 2011
Messages
580
Hello,

I have a textbox that calculates the current fiscal year using the following equation:

=IIf(Month(Date())<4,DateSerial(Year(Date()),3,31),DateSerial(Year(Date()+1),3,31))

My problem is that the fase part of the equation calculates Mar 31 2013, and I need it to be Mar 31 2014. How do I go about adding a year onto this, as the Year(Date()+1) part doesn't seem to be working.

Thanks
 
Try
Code:
=IIf(Month(Date())<4, DateSerial(Year(Date()),3,31), DateSerial([COLOR=Red][B]Year(Date())+1[/B][/COLOR],3,31))
 
Date() + 1

adds a day to the date (4/9/2013 becomes 4/10/2013). You need to move that +1 outside the parenthesis it is in so that it gets added to the Year:

Year(Date()) + 1
 
Thanks Pr2, I was just coming back to mark SOLVED!

Cheers,
 

Users who are viewing this thread

Back
Top Bottom