cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Advocate II
Advocate II

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
Community Support

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.
Highlighted
Advocate II
Advocate II

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,972)