Jump to content
Sign in to follow this  
gillian

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 this post


Link to post
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 this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.