Showing results for 
Search instead for 
Did you mean: 
Level 8

Re: Adding working days and hours to a date



I can't thank you enough.


My problem has been resolved. Thank you so much. Appreciate your time and effort on solving this problem.


Many thanks again.

Level 10

Re: Adding working days and hours to a date

You’re welcome... 🙂
Level 8

Re: Adding working days and hours to a date



Hey Sienna,


I know I'm being a pain 🙂
But is there a possibility to be able to:


  • Define the working hours on an outside field? Like. A Text Input 1 from start of working hours, and Text Input 2 for end of working hours, like Text Input 1 = 08:00, Text Input 2 = 15:30, and sometime later I might edit Text Input 1 = 09:30, and Text Input 2 = 14:30. For example.
  • Define holiday, like to put holiday in Text Input 3 And Text Input 4 And Text Input 5, like saying: Text Input 3 = 28/4/2018, Text Input 4 = 29/4/2018. And sometime later I changed it to Text Input 3 = 25/5/2018, Text Input 4 = 26/5/2018, Text Input 5 = 27/5/2018


I know it is hard to do. But can I do that? If it works, the code would be perfect. To be able to redefine the working hours whenever I want for future services, and define Holiday for Future services.


Thanks a million again.

Level: Powered On

Re: Adding working days and hours to a date


This would really help me with my app to exclude Saturdays and Sundays. You obviously made this code to exclude Fridays and Saturdays. I've been messing with the code a bit to figure out how to exclude Sat and Sun but could not find out which values to tweak. Any chance you could modify the below code to accomodate for the exclusion of Saturdays and Sundays?


DateAdd(DataCardValueExitDate.SelectedDate, Value(Label5.Text) +
RoundDown(Value(Label5.Text) / 5, 0)*2+
Switch(Weekday(DataCardValueExitDate.SelectedDate),5,If(Mod( Value(Label5.Text) , 5)>0,2,0),
4,If(Mod( Value(Label5.Text) , 5)>1,2,0),
3,If(Mod( Value(Label5.Text) , 5)>2,2,0),
2,If(Mod( Value(Label5.Text) , 5)>3,2,0),
1,If(Mod( Value(Label5.Text) , 5)>4,2,0))

Helpful resources


Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,787)