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

Finding the difference between 2 date fields

Status
Not open for further replies.

moben

IS-IT--Management
Feb 5, 2002
116
GB
Hi,

I want to be able to use the difference between 2 dates as my record selection criteria i.e.

if (date1 - date2) < 15 then print record.

I've come across DateDiff in Access/VB6, but can't see any similar function in CR.

I am using CR version 4 (the one that ships with VB6), and the fields are contained within an Access 97 table as date fields.

Any help would be most appreciated.


Regards,

Moben.
 
Datediff() is a valid CR function, starting in version 8 Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Datediff() is a valid CR function, starting in version 8. Check the Crystal Decisions website, Datediff() may be available as a UFL for download. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
dgillz,

Thanks for your replies, but as soon as I sent my message, I just tried subtracting the dates i.e.

Print records where (date1 - date2) < 15

This worked, I even had a column displaying the result of date1 - date2 in days.

Moben.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top