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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dateadd function

Status
Not open for further replies.

ncchish

Programmer
Jul 29, 2002
86
US
I'm using Crystal 11. Can you tell me how to set up the record selector for this? I need to check the contract date and get all of those contracted for 24 months from their initial contract date. I tried to use this but I get a boolean error. Any help is appreciated. Thanks.

{contract_date} in DateAdd ("m", 24,currentdate)
 
Also, the contract date covers a period of 2 years so it would cover those contracted in '08 & '09' and then '09 and '10' and so on. Thanks.
 
{contract_date} in CurrentDate to DateAdd ("m", 24,currentdate)

The above will get you everything from today and the next two years. Is this what you want?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
What I need is time they are contracted (starting in '08) plus 2 years. So, if they are contracted in 2008 then it will cover the first 2 years of that contract period. If they are contracted in 2009 then it will cover 2 years for them. They roll off after a 2 year period. Is this clear?
 
CurrentDate in {Contractdate} to Dateadd("m",24,{Contractdate})

The above will only return the records that have an "active" contract, with "active" being defined as within 2 years of the contract date.

Is this what you want?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Yes, it's closer but I'm getting those contracted before '08' and I shouldn't be. Thanks for your help.
 
CurrentDate in {Contractdate} to Dateadd("m",24,{Contractdate}) AND
{ContractDate}>=Date(2008,1,1)

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top