I am running a Get ITems query trying to compare todays date to the Created date (the sharepoint list standard item not something I added)
I have been trying using the expression editor as follows formatDateTime( utcNow(),'yyyy-MM-dd') gt addDays('Created',7,'yyyy-MM-dd')
I get an error message that "the value provided for date time string 'Created' was not valid."
i've also tried replacing 'Created' with item()?['Created'] and even tried formatDateTime(addDays('Created',7),'yyyy-MM-dd') but I get the same message
I've checked the list setting and the item is called Created and it's in Date and Time format I've also checked every row in the list and they all have a Created date.
I've also created a new list without anything but the default columns and Created is one of the default
In desperation I ran a compose to display the Created date and I get the same error message.
Any thoughts, hints or pointers?
Solved! Go to Solution.
When you pass 'Created' as a parameter to addDays, it will be used as a text literal. It should be Created without the quotes.
Also, are you trying to get one item or multiple? Get items will return an array, whereas Get item will return only one.
If you want multiple, any further processing should be inside a for each loop where you can refer to the Created field using items('Apply_to_each')['Created']
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.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!