Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
1 like 0 dislike
15 views
in Power Apps by 22 24 29

I'm trying to calculate the last day of a specific month dynamically in PowerApps. The solution should work for all months, including February during leap years.

What is the best formula or approach to achieve this in PowerApps?


1 Answer

3 like 0 dislike
ago by 49 55 96
selected ago by
 
Best answer

Get the Last Day of the Month in PowerApps?

To calculate the last day of a specific month dynamically in PowerApps, you can use a combination of date functions

  • Creating the first day of the current month.
  • Adding one month to get the first day of the next month.
  • Subtracting one day to get the last day of the current month.
    DateAdd( DateAdd(Date(Year(Now()),Month(Now()),1),1,TimeUnit.Months),-1,TimeUnit.Days)

By implementing this expression, you can dynamically calculate and display the last day of any month based on user input or any given date in your PowerApps application.

For more details Please Check PowerApps get last day of month

If you don’t ask, the answer is always NO!
...