cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnyttan
Frequent Visitor

Calculate the number of days in a month based on a date

Hi guys, let's say I pick a date from Date picker in Power Apps. Based on the date selected, how can I automatically calculate the number of working days (excluding Sunday) in that particular month? 

For example, I pick 11th October 2021, and I get 26 days for the month of October 2021.

I am able to do so using the EOMONTH and NETWORKDAYS.INTL functions in Excel but seems like there isn't a direct function to be used in Power Apps.

11 REPLIES 11

@StalinPonnusamy The formula works perfectly now. Thank you!

@johnyttan 

Those are not the numbers that I see with the formula.

Using the same formula I sent you with the dates that you have, this is what is produced using the function first for total days, then excluding Sun, then excluding Sun and Sat.:

 

RandyHayes_1-1634047758875.png

Did you happen to make some change in the formula?  

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,582)