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
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 341 members 4,002 guests
Please welcome our newest community members: