Hello all,
I have a sharepoint list that has a column formated as Date Only and I'm trying to build a flow that compares the Dates at that column with today date. I think I got it all correct but the condition always consider it false.
So this is the list and as you could see one date is "23/04/2020" equals to today.
This is the flow, I put that compose step in the middle to see if the expression is getting the correct value.
My expression is formatdatetime(utcnow(),'dd/MM/yyyy') to get the same format as it at sharepoint list.
Testing the flow, I can see that the expression is getting the same exact value as the list, but at the end I get 2 times false and the first date should get true:
Someone can help me with this?
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
You could troubleshooting your flow by add a Compose 2 action before the Condition and inside the Apply to each, save the date column dynamic content inside the Compose 2, run the flow and check the value in the output of the Compose, then your issue could be solved.
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
TRy with
formatDateTime(utcNow(),'yyyy/MM/dd')
I would also suggest to replace operator equals and use contains instead, even though equals should be OK
Ánimo!
#YoMeQuedoEnCasa
Proud to be a Flownaut!
@Anonymous
I believe that you'll need to use the format yyyy-MM-dd as that is how SharePoint stores the dates internally
formatDateTime(utcNow(),'yyyy-MM-dd')
Also, you'll likely be better off using an OData filter rather than a condition. That way, only those items that meet your requirement will be returned - no need for a condition. Substitute the internal name of your date column for MyDate in the example below:
Hi @Anonymous ,
You could troubleshooting your flow by add a Compose 2 action before the Condition and inside the Apply to each, save the date column dynamic content inside the Compose 2, run the flow and check the value in the output of the Compose, then your issue could be solved.
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey,
Thanks for the reply, it's still not working 😕
Hi @Anonymous ,
Could you please create the flow same as mine and share the screenshot of the run history of the flow, including the Compose and the Compose2 in the screenshot?
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @v-alzhan-msft ,
Yes I've done it and I figured it out the error, but still have an issue now.
So to start let me explain you more about the list, I've got two date, the first column is the due date and the next one is a calculated column, formated as date only that is doing the [DataCaducidade]-15. Because I want to notify an e-mail when 15 days left to the due date:
Doing the compose function that you recommend me, I figure out that is returning the date that I've created the entry on the list, with hours included:
So now I'm trying to do the subtraction on power automate with the following expression, but is getting me an error:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
28 | |
27 | |
23 | |
14 | |
10 |
User | Count |
---|---|
62 | |
50 | |
30 | |
29 | |
24 |