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!

DateDiff to calculate workdays but not include specific dates

Status
Not open for further replies.

farmera

MIS
Feb 4, 2005
20
US
thread1462-1527034

I want to add to the formula in the referenced thread and ask it not to include a list of holiday dates in the calculation. I'm thinking of using an IF statement but am really new to programming. I'm using Crystal XI to pull from an Oracle 10g database.

The following is the referenced formula and works. I just need to expand on it to not count holidays.
{@MonthStart} and {@MonthEnd} are Crystal formulas.

DateDiff ("ww",({@MonthStart}),({@MonthEnd}), crMonday) +
DateDiff ("ww",({@MonthStart}),({@MonthEnd}), crTuesday) +
DateDiff ("ww",({@MonthStart}),({@MonthEnd}), crWednesday) +
DateDiff ("ww",({@MonthStart}),({@MonthEnd}), crThursday) +
DateDiff ("ww",({@MonthStart}),({@MonthEnd}), crFriday)

Thanks for any ideas,

Farmera
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top