In this blog we discuss about CurrentMonthEndDate

we have to achieve this. How are we going to do that? I wanted to provide a solution which shall work under all circumstances irrespective whether a month has 28/ 29/ 30 or 31 days.

So let’s get started. For this blog, I created a simple Instant cloud flow with manual trigger. The idea here is simple.

->Get the current date
->Add one month to the current date to get the next month.
->Get the start date of the next month
->Subtract a day from the start date of the next month to arrive at the last day of the current month.

Sometime back, I wrote a blog post on how to get the Next and Previous month in Power Automate. Taking cue from this post, I added a month to the current date using the ‘Add to time‘ action.

As you can see, I added a month to the current date and time. To be more accurate you can use the time zone conversion action to convert it to a specific time zone, since utcNow() always returns the UTC date and time.

Now the final step. I used a string variable to get the last day of the current month

I have used this formula fx; addDays(triggerBody()[‘text’],-1,’MM-dd-yyyy’)

I use startOfMonth() function to get the starting day of the next month. Then substract one day to arrive at the last day of the current month.if you are new to Power Automate, these are the small things that may eat up your time.

Save the flow and test manually 


Click->Run flow

And below is the result when I run the flow. example As of writing this blog, today’s i30th of january, 2023. And rightly it shows the last day of month as 31st January, 2023.