Date Due Calculation that Skips Weekends.

  • Follow


I currently have a calculation that determines when a project is due.  Is it
possible to have it skip weekends?  How can this be done.

My current calculation is:
Creation Date + daysLeftOpen + (Truncate(daysLeftOpen / 5, 0)) * 2

Thanks.
C


0
Reply Chris 4/27/2004 11:55:24 PM

You already have a field that calculates appointment date, so lets 
assume its called "appointment_date". Add the following calculation 
field (date result):

Case(
	DayName( appointment_date ) = "Saturday", appointment_date + 2,
	DayName ( appointment_date ) = "Sunday", appointment_date +1,
	appointment_date
)

Adjust to suit your needs. As an example, if you prefer to schedule 
Saturdays for Friday use appointment_date - 1.

You can substitute your existing formula where you see appointment_date 
above, but might make things a little hard to read. If your working with 
version 7 you can clean things up a bit using the Let function.

Michael Myett

Chris wrote:
> I currently have a calculation that determines when a project is due.  Is it
> possible to have it skip weekends?  How can this be done.
> 
> My current calculation is:
> Creation Date + daysLeftOpen + (Truncate(daysLeftOpen / 5, 0)) * 2
> 
> Thanks.
> C
> 
> 
0
Reply Michael 4/28/2004 12:40:46 AM


Asuming that 1 workday from Saturday or Sunday is Tuesday, I think that
the following should do what you want.

start + workdays + Case(DayofWeek(start)=1,-1,
        DayofWeek(start)=7,0,
         0) + 
Truncate((workdays+If(DayofWeek(start)=1 or
DayofWeek(start)=7,5,DayofWeek(start)-2))/5,0)*2 

Where start is a date field and wordays is a number field.

Regards

Bob

Chris <ecbly@comcast.net> wrote:

> I currently have a calculation that determines when a project is due.  Is it
> possible to have it skip weekends?  How can this be done.
> 
> My current calculation is:
> Creation Date + daysLeftOpen + (Truncate(daysLeftOpen / 5, 0)) * 2
> 
> Thanks.
> C
0
Reply bob 4/28/2004 4:11:34 PM

2 Replies
576 Views

(page loaded in 0.112 seconds)

Similiar Articles:








7/21/2012 8:48:49 PM


Reply: