Hi!
I have a flow, which has a step "Get items" and it gets items from a Sharepoint list. I would like it to:
- order them from oldest to newest, so in "Order By" I have "Created asc"
- get only items older then 90 days
- for testing purposes I added "Top Count"=1, cause my flow is supposed to delete those records, so I wanted to start with only 1 record
In "Filter query" I already tried the following, but I am always getting the same error (just the formatting mentioned in the error changes to the format that I am trying at the moment):
"Action 'Get_items' failed: The expression "Created le 2025-10-19T12:00:00Z" is not valid. Creating query failed."
So I tried the following:
Created le formatDateTime(addDays(utcNow(),-90),'yyyy-MM-ddT00:00:00Z')
Created le formatDateTime(addDays(utcNow(),-90),'yyyy-MM-ddT00:00:00')
Created le formatDateTime(addDays(utcNow(),-90),'yyyy-MM-dd')
Created le formatDateTime(addDays(utcNow(),-90),'g')
I tried also a different way - I added steps: Current time, Convert time zone, Subtract from time - which gave me "Calculated time" equal to "2025-10-19T00:00:00.0000000".
The I tried both using it in filtering without further formatting it, as well as with formatting to several date formats. Always ended up with the mentioned error.
Please help me as I am completely clueless.
Thank you!