cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zwornik80
Helper III
Helper III

Conditon {Greater Then Current Date} does not evaluate correctly

I have daily Flow which should send email notification when date in column "Actual delivery date (LEST)" is exceeded. I have used below setting in "Condition":

Condition.png

Problem is that I am getting email notification about exceeded date also when "Actual delivery date (LEST)" is equal to today's date. For example I run it today (27.02.2021) and data associated wit below row

Actual delivery date.png

was also included in email, while it should be included in tomorrow's notification, because below condition should not evaluate to True:

[utcNow() = 27/02/2021] IS GREATER THAN [Actual delivery date (LEST) = 27/02/2021]

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User II
Super User II

Hello @zwornik80 ,

try to add a 'Compose' action before the condition and store the utcNow() and Actual delivery date into the compose action. That way you'll be able to see what values enter the 'Condition'.

I can image that since you're not formatting the utcNow() date it'll contain also hours/minutes/seconds, and then it might evaluate: 

[utcNow() = 27/02/2021 10:21:40...] IS GREATER THAN [Actual delivery date (LEST) = 27/02/2021]

which is true as the Actual delivery date without time would be at 00:00:00. utcNow() is 10:21:40 greater than the Actual delivery date.

I'd try to remove the time from utcNow() to keep only the year, months and days (that will take today's date at 00:00 in UTC time zone).

utcNow('yyyy-MM-dd')

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User II
Super User II

Hello @zwornik80 ,

try to add a 'Compose' action before the condition and store the utcNow() and Actual delivery date into the compose action. That way you'll be able to see what values enter the 'Condition'.

I can image that since you're not formatting the utcNow() date it'll contain also hours/minutes/seconds, and then it might evaluate: 

[utcNow() = 27/02/2021 10:21:40...] IS GREATER THAN [Actual delivery date (LEST) = 27/02/2021]

which is true as the Actual delivery date without time would be at 00:00:00. utcNow() is 10:21:40 greater than the Actual delivery date.

I'd try to remove the time from utcNow() to keep only the year, months and days (that will take today's date at 00:00 in UTC time zone).

utcNow('yyyy-MM-dd')

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

I did Compose on utcNow('yyyy-MM-dd') and the output was: 27/02/2021

I did Compose on "Actual delivery date (LEST)" and the output was: 2021-02-27

This revealed what why I was having issue. Flow sees date formatted as YYYY-MM-DD while in SharePoint List I see it as DD/MM/YYYY

I fix it by applying this condition:

 

utcNow('yyyy-MM-dd') IS GREATER THAN [Actual delivery date (LEST) = 27/02/2021]

 

Many thanks for help!

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 (12,486)