cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MitchC3
Level: Powered On

Scheduled flow to check for last day of the month in a condition

I need a condition to check if tomorrow's day value is less than today's day value (aka 28th/30th/31st -> 1st). I have a bloated workaround to check for is today the 28th in Feb, 30th in months that end in 30 days, and 31st for months that end in 31 but I think this is a lot cleaner.

 

My current condition is:

 

addDays(utcNow('dd'),1)

is less than

 

utcNow('dd')

The first code snippet is the issue. I don't know how to pull tomorrow's day value correctly.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Scheduled flow to check for last day of the month in a condition

Hi @MitchC3 
You can use the expression below to get tommorrow's day value.
dayOfMonth(addDays(utcNow(),1))
Compare this with todays day value
dayOfMonth(utcNow())

 

Also, should you need it, I think its possible to get the end of the month using the following expression
addDays(startOfMonth(addDays(startOfMonth(utcNow()),32)),-1)

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

1 REPLY 1
Super User
Super User

Re: Scheduled flow to check for last day of the month in a condition

Hi @MitchC3 
You can use the expression below to get tommorrow's day value.
dayOfMonth(addDays(utcNow(),1))
Compare this with todays day value
dayOfMonth(utcNow())

 

Also, should you need it, I think its possible to get the end of the month using the following expression
addDays(startOfMonth(addDays(startOfMonth(utcNow()),32)),-1)

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 326 members 5,685 guests
Please welcome our newest community members: