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

Simple flow ... date / time column, can't compare with utcnow ()

Hello
At the beginning I would like to welcome the entire crew 🙂 Now I would like to present my problem:
I have a Sharepoint list and an ALARM column. This column is of the Date / Time format.
Despite repeated attempts, I can't compare this column with the utcnow in Power Automate.
I am asking for a simple explanation or reference to a simple source. 
I will add that I can do it in Power Apps, here I am asking for help 😞
Thanks for your patience 🙂
1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Thoma2008 ,

try to add 'Compose' action in the 'Loop' before the 'Filter' and store both sides of the filter in that 'Compose' action. That way you'll see in the flow run history what values enter the condition and that might give you a hint why it doesn't work.



[ 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

4 REPLIES 4
tom_riha
Super User
Super User

Hello @Thoma2008 ,

if it's a date and time column then you can't use the 'eq' operator as the dates including time (up to mili seconds) will never be equal. With time you must always filter using a range - less than, greater than, or combination, e.g. all items with Date between yesterday 00:00:00 and today 00:00:00.

Date gt 'addDays(utcNow('yyyy-MM-dd'),-1)' and Date lt 'addDays(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. ]

My List:

Lista.jpg

My Flow with specified Date:Flow z datą.jpg

The result of this flow:
Wynik z datą.jpg
When I have changed 2021-11-26 on formatDateTime(utcNow(),'yyyy-MM-dd') I Become this:
Wynik z utc.jpg
Where I am going wrong?

Hello @Thoma2008 ,

try to add 'Compose' action in the 'Loop' before the 'Filter' and store both sides of the filter in that 'Compose' action. That way you'll see in the flow run history what values enter the condition and that might give you a hint why it doesn't work.



[ 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

Thoma2008
Frequent Visitor

Thank you for your time and the advice that brightened my mind 🙂

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,585)