I am not sure I understand but if I do then just change your statement to be:
[Referral_Appt_Date] < and _add_days(current_date,-30
Main Topics
Browse All TopicsI need to find records that are have a Referral_Appt_Date over 30 days old.
I tried the code below, but I now realize that this will actually do the opposite of what I'm trying to achieve.
Any ideas?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Sorry for not replying back sooner, I was out of the office.
What you posted looks good, but problems arise when I try to implement it. First, an error pops up that says there's an error in my report, but it's not related to the expression (after I clicked the validate button). After lots of fooling, I tried putting in the full path to the expression, namely:
[Demographics].[Referral_T
This starts to "validate", but then errors out in a different spot. The error that throws next is this: An "error occurred while performing operation 'sqlPrepareWithOptions' status='-56'."
I don't know much about Cognos, but it feels like your code is right, but something else isn't. The report works fine until I try to add this filter.
Ideas? Thanks.
Is Referral_appt_date actually stored in SQL server as a date?
In the frame work is the Item 'Data Type' listed as Date Time.
Also your path worries me a little it implies that you have three name spaces named "Referral_Tracking" this is a reciepe for disaster. Are you able to just add this item to the query without it erroring out.?
Which version of the tool are you using? Is version 7 or Cognos8?
1) Yes, it's a date in the db.
2) I'm not sure where to find where the "Data Type" is located. I am using Report Studio.
3) The path is a ridiculous convention that our vendor set up. It's getting fixed soon to a more logical manner, but I am only a user on this system and can't change anything. And yes, I can add this field to the report and it display fine.
4) We are using version 8.2.
Business Accounts
Answer for Membership
by: burrcmPosted on 2009-09-08 at 05:54:14ID: 25281305
Are you using Impromptu? If so, the date - 30 days can be expressed as
Referral_Appt_Date <= today() - 030 00:00:00.000
Chris B