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

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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