# Calculate start date back from del. date

## Recommended Posts

Hi

I would like to know if anyone has a simple calculation to work out a start date back from a delivery date required, based upon the number of working days a project would take e.g.

If delivery date must be 31st Aug 2007 and it would take 12 working days to produce the project, then result = it must be started by 16th Aug 2007.

Any help would be much appreciated.

Thanks

Gill :-)

##### Share on other sites

check this one

http://www.briandunning.com/cf/722

shipByDate ( startDate ; numberOfDays ; satuday)

```
//name: shipByDate

//purpose: returns the day you need to ship by in order for your package to arrive by the date provided

//params:

//startDate: (the initial date)

//numberOfDays: (how many WORKING days after the start date)

//saturday: if saturday = "y" then saturday IS a working day, otherwise not.

Let(v=If(saturday="y"; "2,3,4,5,6,7";"2,3,4,5,6")

;

If(Filter ( DayOfWeek(startDate-1) ; v );

If(numberOfDays -1=0;startDate-1;

shipByDate(startDate-1;numberOfDays-1;saturday));

shipByDate(startDate-1;numberOfDays;saturday

)

))

```

##### Share on other sites

That's brilliant, thank you for your help!

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

×
×
• Create New...