cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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

Highlighted
Frequent Visitor

Re: Flow Formatting

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

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (7,449)