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

Date

Status
Not open for further replies.

Cretin

Technical User
Jan 2, 2003
194
US
I am using crystal to report off of whats known as a heat database. The date is actually stored as a text string. Is what I am trying to do is develope a date formula that looks for all records over 90 days old. The 2 fields I use is currentdate and datereceived. So basically is what I need are all records where the difference between the date received and the current date is over 90 days. Any help would be appreciated.
 
You say that the date is in a string format but you don't say what that format is... You can use the CDate function to convert pieces of the date string to a date, something like this:

CDate('11/06/2003') <= CurrentDate - 90
 
That does look like it worked. Now I need to look up what cdate means so I understand what happened. I appreciate your help

Cretin
 
Try creating a SQL Expression which Casts or Converts it as a date, and then do your comparisons against that, such as a record selection formula of:

{%RealDate} <= CurrentDate - 90

you'll get better performance, plus you'll have a real date field for use in the report.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top