cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ganeshtamil_29
Helper IV
Helper IV

How to get the weekend days based on the two date pickers?

Hi,

I need the no of Saturdays and Sundays in between the two date pickers.

Kindly advise

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Ganeshtamil_29 ,

This will count the weekend days

With(
   {
      wWeeks: 
      RoundDown(
         DateDiff(
            DatePickerStart.SelectedDate,
            DatePickerEnd.SelectedDate,
            Days
         ) / 7,
         0
      )
   },
   2 * If(
      Weekday(DatePickerEnd.SelectedDate) < Weekday(DatePickerStart.SelectedDate),
      wWeeks + 1,
      wWeeks
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

Hi,

Your formula is count the Saturdays and sundays in between two date pickers but it will not count the Saturdays itself. need that too.. kindly advise

Ganeshtamil_29_0-1654831794594.png  

Ganeshtamil_29_1-1654831854491.png

 

 

@Ganeshtamil_29 

Assuming the dates are week dates, divide it by 2

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,500)