I want to compare date from an Excel row and whatewer I try I always get the same error.
For an easier understanding this is my flow and my excel rows. Basically Every hour I firstly convert the time line, then I list the rows in the Excel and then there is the if statement where I check if there are any dates matching. If they match I then proceed to post a message in Teams.
I am using this to compare date from excel with this
I would love any help and would really be thankful if anybody knew how to solve my problem.
Hello @nap123 ,
try to add a 'Compose' action before the 'Condition' and store the Date from Excel in that 'Compose'. You'll then see in the flow run history what value was returned from the Excel and you can adjust the today's date accordingly.
But in general, when comparing dates in Power Automate, you should always use the ISO format 'yyyy-MM-dd' everywhere (if you don't need the time). That means using the formatDateTime(...) expression on both sides of the 'Condition' to convert the date from Excel and the utcNow(...) date.
The other option would be to filter the rows directly in the 'List rows present in a table' action, without the need to loop through all the rows, which I wrote about some time ago.
Thanks for the suggestion, but if I understand what you are saying is that I put if formatDateTime() is the same as
On the left side, you must remove the time from the DATUM dynamic content. Go to the expression tab and use the formatDateTime(...) expression to format the date:
formatDateTime(<DATUM dynamic content>, 'yyyy-MM-dd')
on the right side, you want to format the today's date to the same format. Since the utcNow(...) expression allows you to format the date directly, you can use just the expression below.
I still get a error when trying to put in the left side value. I always get this error
"The term was invalid"
I also tried to put in the dynamic content DATUM but when I choose dynamic content only two things come up
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.