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

Flow Formatting

I have copied every similar example I can find and still am having issues.  Trying to build a simple flow to send an email when an on call shift starts.  The On Call schedule is saved in a SharePoint list.  

 

My flow is:

Recurrance - daily at 7:45

Get Items from my SharePoint List

Apply to each

Value (from sharepoint list

Condition:@equals(formatdateandtime(items('Apply_to_each')?['MOC_x0020_Start'], 'yyyy-MM-dd'), formatDateTime(utcNow(),  'yyyy-MM-dd'))

 

If yes, send an email

 

It keeps failing with no match, I think it has something to do with date format but I am out of ideas...

 

thanks in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
JoshL
Level: Powered On

Re: Flow Formatting

I currently use a flow that checks a date against today's. This is what I use:

 

 

@equals(formatDateTime(items('Apply_to_each_2')?['dueDateTime'], 'MM/dd/yyyy'), formatDateTime(utcNow(),'MM/dd/yyyy')) 

 

 

For you it'll be:

 

 

@equals(formatDateTime(items('Apply_to_each')?['MOC_x0020_Start'], 'MM/dd/yyyy'), formatDateTime(utcNow(),'MM/dd/yyyy')) 

 

I remember struggling with this and IIRC it has something to do with the format. Flow is a little tricky when it comes to comparing dates. Your format function is also quite dubious in your first parameter for the comparison. If this doesn't work please provide the errors you were getting before and after.

 

I hope that helps!

 

View solution in original post

2 REPLIES 2
Highlighted
JoshL
Level: Powered On

Re: Flow Formatting

I currently use a flow that checks a date against today's. This is what I use:

 

 

@equals(formatDateTime(items('Apply_to_each_2')?['dueDateTime'], 'MM/dd/yyyy'), formatDateTime(utcNow(),'MM/dd/yyyy')) 

 

 

For you it'll be:

 

 

@equals(formatDateTime(items('Apply_to_each')?['MOC_x0020_Start'], 'MM/dd/yyyy'), formatDateTime(utcNow(),'MM/dd/yyyy')) 

 

I remember struggling with this and IIRC it has something to do with the format. Flow is a little tricky when it comes to comparing dates. Your format function is also quite dubious in your first parameter for the comparison. If this doesn't work please provide the errors you were getting before and after.

 

I hope that helps!

 

View solution in original post

bpg950
Level: Powered On

Re: Flow Formatting

You are my hero!!  Thank you!!  Worked like a charm!

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: 196 members 5,461 guests
Please welcome our newest community members: