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!

DATE CALCULATION: 6 MTHS. OR OLDER THAN 6 MTHS, BUT NOT UP TO 6 MTHS. 3

Status
Not open for further replies.

edteck

MIS
Feb 23, 2000
47
IE
Report needs to show incomplete projects which started 6 months ago or earlier, but not before.

Any pointers as to how to go about this would be appreciated.

Is it possible to adapt the ready-to-use formulae in the Date Range Functions e.g. Aged61To90Days etc. to whatever one's requirements are?
 
I don't beleive it's possible to modify the Aged61to90 days function, but you could use the Agedover90days function in conjunction to give you a complete listing.

The function only works if it can report on a field that contains the creation date of the project.
 
The date functions in V8 are much better than V7, and there is a DLL that you can download that will give you the new functions in V7. The one you need is the DateAdd function.

Once you have it you create a formula called @TargetDate:

DateAdd( 'm', -6 , CurrentDate )

Now you can put a rule in the selection formula that is:

YourDate <= {@TargetDate} Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thank you for your help. The Dateadd download applies to 32-bit only. I use 16-bit. Is there a round this?
 
Yes, there is an older technique, which is a bit more complicated.

Go to the FAQ area and see the FAQ on common formulas. Formula #5 allows you to add (or subtract) months from a date the old way (before DateAdd). Follow the link and it will give you a formula that you can copy into your report. It has instructions on the two changes to make so that it reads your date fields. Give it the number -6. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top