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!

Formula for past 6 months 1

Status
Not open for further replies.

oshlonger

IS-IT--Management
Oct 31, 2002
76
US
This formula worked correctly in Crystal 6.5 but returns an error in Crystal 8.5 I can't figure it out.

If Month(CurrentDate) < 7 then
{DateCreated} >= Date(Year(CurrentDate)-1, Month(CurrentDate)+6, 01)
Else
{DateCreated} >= Date(Year(CurrentDate), Month(CurrentDate)-6, 01)

Basically, depending on the current date, the report selects all cases in the past 6 months. The error says that the month value must be in the range 1 to 12. 6 should only be added to the current date if the current date is less than 7. It doesn't seem to be evaluating the if statement.

Please advise!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top