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

Calculating the difference between dates in days

Status
Not open for further replies.

cmcgann

Programmer
May 31, 2000
22
IE
Hi All<br><br>What i need to do is find out the difference between two dates in days. One date is a text field and the other is the current date.<br><br>Can this be done in Crystal, and if so can you calculate the difference&nbsp;&nbsp;minus the weekends.<br><br>Thanks in advance<br><br>
 
I also need help with this problem, and the previous response had a bad link. [sig][/sig]
 
There are two different questions:

First can you do the difference between today's date and a text field. Yes, after you convert the text to a true date. A formula to do this is item number 3 on the following page:


Crystal also has a function that you can use in a formula called &quot;CurrentDate&quot;. It can be used in any formula and will use the system date of the computer as its value. So once you convert the text to a date you can simply say:

CurrentDate - {@NewDateFormula}


That will give you the difference in days, including weekends. If, however you want to skip weekends (and even holidays) see item number 1 on the same page:


Both of these formulas can be cut and pasted into your formula editor and have basic instructions.


[sig]<p>Ken Hamady- href= Reports Training by Ken Hamady</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top