How to find business days calculation

i have aprobelm in mail escalation

like

acustomer raises complaint on some product

let think today he raised

so customer support are not able to solve the complaint with in 24 hrs a mail shd go to head in next 24 hrs

the problem is mail shd go in such a way that sundays and company holidays should get excleduded on in working days mail should go

so how to adjust the day if it the criteruia

i hope expers will soon give solution for my query

Subject: how to find business days calculation

Look up @businessdays in designer help@BusinessDays( startDates ; endDates ; daysToExclude ; datesToExclude )

Subject: how to find business days calculation

How are you getting the system to send the e-mail?

If your putting in a calculation to determine when an e-mail should be sent, you could just check the date and see if it’s a Sunday / Company Holiday. If it is add 24 hours and check the next date again (incase you have a Holiday after a Sunday or vice versa).

The issue is you will have to have a list of company holidays somewhere to validate against. There are holidays in the Address Book, but you need to determine if these actually match your Companies Holidays.

Subject: RE: how to find business days calculation

can any one send the code for this…

Subject: RE: how to find business days calculation

Lotus Script / @Functions?

How are you determining to send the e-mail? Are you setting a date on the document and having an agent to determine when the date/time has past? Or are you just running an agent to look at the “create” date to determine when e-mail is sent?

Here is an approach. I’m going to assume you have a field (called CreateDT) with the document;'s creation date and a multivalue field with the list of Holidays in Holidays.

Here is an approach, I haven’t checked the syntax, so you will probaly need to make some corrections.

tmpDT := @if( CreateDT=“”; @now; CreateDT);

dow := @Weekday( CreateDT )

adjust := @if( dow = 1; 1;

	dow = 6; 3;

	dow = 7; 2);

tmpDT := @Adjust( tmpDT; 0; 0; adjust; 0; 0; 0);

IsHoliday := True;

@While( IsHoliday;

IsHoliday := @IsMember( tmpDT; Holidays);

tmpDT := @Adjust( tmpDT; 0; 0; 1; 0; 0; 0)

);

Field EsculateDT := tmpDT;

First we look at the creation date, if it’s a Sunday (DOW=1) then add 1 day. if it’s Friday (DOW=6) add three days and if it’s Saturday (DOW=7) add 2 days. Clearly adjust for your company… Maybe you work Saturdays and don’t need the +3 days for Friday.

Then I check the date against the list of Holidays. If it’s a member then it’s a Holiday, adjust the day by 1 day and tty again. Please check @IsMember as I then to write it backwards.

Good Luck,