cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JBennett12
Helper III
Helper III

How do I calculate the number of days in a month depending on the month chosen?

I'm trying to create a variable that holds the number of days in any given month. This app will ideally be used into the future. So I want to be able to write something that I won't have to maintain (go in and change the variable over and over again throughout the months and years). Is there a function that grabs the amount of days in a month? 

 

Thank you,

1 REPLY 1
cwebb365
Super User
Super User

I don't know if there is an easier way, there always is, but this is what I come up with. 

Day(DateAdd(DateAdd(Today(),1,Months),-Day(Today()),Days))

Adding a Month, then Subtracting the current date days, and getting the day leftover.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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