?
Solved

Date formula that goes back 5 years

Posted on 2010-01-11
7
Medium Priority
?
411 Views
Last Modified: 2012-05-08
Hello Experts,
Is there a way to create a date formula that will pull records from the current date back 5 years?  The formula should look at a date time field on the report and retrieve records that go back 5 years from the current date. The report is querying an Oracle database. Any suggestions?  Thanks.
0
Comment
Question by:jsmith08
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 26285472
Use the SELECT EXPERT

{DateField} >= DateAdd('yyyy'-5,CurrentDate)

mlmcc
0
 

Author Comment

by:jsmith08
ID: 26286850
Thanks...
I used the following formula:
{CASE.FILE_DT} >= DateAdd('2010'-5,CurrentDate)
and I get the error message that "A number, currency amount, date, time, or date-time is required here."
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 26287536
Where do you get that?

You have to add that to the selection filter
REPORT --> SELECT EXPERT

mlmcc
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:jsmith08
ID: 26287677
Yes, I did add it to the select expert and that's the error that comes up
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 26287850
i see the issue.

Don't use 2010 use yyyy
You are telling dateadd to add years

mlmcc
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 26287865
Sorry I missed a comma

{DateField} >= DateAdd('yyyy',-5,CurrentDate)

mlmcc
0
 

Author Closing Comment

by:jsmith08
ID: 31675597
Thank you. This works perfectly.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question