• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1985
  • Last Modified:

Between function in crystal

I am suing crystal 9, I want to create a formula that would basically say

if currentdate between 7/1/year(currentdate) and 12/31/year(currentdate) then year(currentdate)+1
else if currentdate between 1/1/year(currentdate) and 6/30/year(currentdate) then year(currentdate)

But I keep getting errors can someone help me with the crystal syntax for this?  
0
aebrehm
Asked:
aebrehm
1 Solution
 
UnifiedISCommented:
IF currentdate in (date(year(currentdate),7,1) to date(year(currentdate),12,31)) THEN
    YEAR(Currentdate) + 1
ELSE if currentdate in (date(year(currentdate),1,1) to date(year(currentdate),6,30)) then
    year(currentdate)
0
 
aebrehmAuthor Commented:
thank you
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now