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

Business days vs Calendar days

Status
Not open for further replies.

ba4crm

Technical User
Dec 19, 2003
92
US
Hi - I am trying to create a formula to calculate the number of days for an activiy. (This has to be only business days and not weekends.) How would I go about doing this?
 
Check out CR Help for the DateDiff function. You'll find the following example. I've used it successfully in CR8.5.

For example, suppose you want to calculate the number of days between the order date and ship date, excluding Saturdays and Sundays:

//Crystal syntax
Local DateTimeVar d1 := {Orders.Order Date};
Local DateTimeVar d2 := {Orders.Ship Date};
DateDiff ("d", d1, d2) -
DateDiff ("ww", d1, d2, crSaturday) -
DateDiff ("ww", d1, d2, crSunday)

Good Luck

Jerry
 
check out he has great formulas documented and this is in there (business days)....

LMC cryerlisa@hotmail.com

select * from Management where proj_mgmt_skills <> NULL

0 records returned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top