Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date range in a nested if then else formula 1

Status
Not open for further replies.

Shannon2008

Technical User
May 28, 2008
17
CA
Good Afternoon All,
I am trying to write a formula that returns a value of "Fiscal 08" if the date in field {PRTIME.PER_END_DATE} is between 2008,03,01 to 2009,02,28 and if the same field {PRTIME.PER_END_DATE} is between 2009,03,01 and 2010,02,28 then "Fiscal 09". I can't seem to get the syntax right or maybe I am not using the correct operators. Appreciate any help.
 
if {PRTIME.PER_END_DATE} in date(2008,03,01) to date (2009,02,28) then "Fiscal 08"

else if {PRTIME.PER_END_DATE} in date(2009,03,01) to date (2010,02,28) then "Fiscal 09"

else "";
 
You could use:

"Fiscal Year "+totext(year({PRTIME.PER_END_DATE}+306)-1,"0000")

This should accommodate leap years.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top