Hello!
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.
utcNow('yyyy-MM-dd')
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
Same problem as above is this resolved. only body and value is coming up
Hello @tercet ,
you can enter the dynamic content as an expression, just check the JSON for the right value and extract it.
User | Count |
---|---|
93 | |
45 | |
20 | |
20 | |
15 |
User | Count |
---|---|
134 | |
53 | |
44 | |
37 | |
27 |