cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bpg950
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
Anonymous
Not applicable

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

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
Frequent Visitor

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

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (14,443)