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

Comparing dates for a Crystal 7.0 Report

Status
Not open for further replies.

msloan

Programmer
May 30, 2001
39
US
Hello,

I am trying to determine the number of days between two dates. The two dates are being pulled from a database table.

for example:
tblProcurement.fldProcurementReqRcvdDate is the from date
tblProcurement.fldProcurementSentToFMODate is the to date
so:
if tblProcurement.fldProcurementReqRcvdDate = 05/31/2001
and
if tblProcurement.fldProcurementSentToFMODate = 06/03/2001
I would expect to see 3 as a return value.

This is my first attempt at working with Crystal Reports and I am not too familiar with all the features. I have tried creating a formula, and a range, and some other things, but nothing really seems to work.

Any suggestions are greatly appreciated.

Thanks in advance,

Matt
 
You can just subtract the two dates for the gross difference.

I believe KenHamandy has posted a helpful FAQ with formulas for date diffing. i.e business days, etc.
 
Hi,

just create a formula like...

{date1} - {date2}


Geoff

 
yes Geoff,

I did this, and it doesn't appear to work

Matt
 
Are your dates actually held as string fields ?

If so you will need to convert from text to date format with the function date(ccyy,mm,dd) first

Geoff
 
The fields within the source table are defined at datetime - do these need to be converted in any way?

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top