cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lknudson1
Level: Powered On

Generate schedule date sequence excluding weekends

I've gone through other posts regarding date diffs & calculated # weekdays & assigning next valid work days (many thanks!), but I don't see something quite like what I need.

I am trying to create a way to generate a schedule of begin and end dates for sequential tasks on a job, each of which have some assigned # of days, beginning with a given date and excluding weekend dates.  So for job "x" starting on Friday, 11/01 I need:

HaveHavecalculated Have

calculated 

Have

NeedNeed     
Task ## daysstart daystop dayBegin DateEnd DateExcludes weekends    
111111/1/201911/1/2019     
232411/4/201911/6/201911/2-3    
315511/7/201911/7/2019     
446911/8/201911/13/201911/9-10    
54101311/14/201911/19/201911/16-17    
63141611/20/201911/22/2019     

 

I can get the begin and end dates I need within first scheduled week (accommodating 1 weekend) with given calculated start/stop DateAdds, but then I hit a roadblock in trying to accommodate multiple weekends which may be incorporated into the overall job schedule.

Any tips?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
lknudson1
Level: Powered On

Re: Generate schedule date sequence excluding weekends

Hi @v-monli-msft ,

I ended up taking a different approach to the problem.  Rather than try to work out some convoluted calculation, I made a SQL table of calendar dates excluding weekends and used that to pull in start/stop dates.

 

Thanks for the response though!

 

 

View solution in original post

2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: Generate schedule date sequence excluding weekends

Hi @lknudson1 ,

 

Can you please explain your requirement with sample data? 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lknudson1
Level: Powered On

Re: Generate schedule date sequence excluding weekends

Hi @v-monli-msft ,

I ended up taking a different approach to the problem.  Rather than try to work out some convoluted calculation, I made a SQL table of calendar dates excluding weekends and used that to pull in start/stop dates.

 

Thanks for the response though!

 

 

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,468)