Reputation: 159
In my sharepoint list of items, I have a "Date Due" field, and a "Status" field. I'm trying to create a recurring flow that occurs once a week. It will grab all items that have a Status of "Open", and a Date Due of either that day or prior to it.
yyyy-MM-dd
format.Status eq 'Open' and Date_x0020_Due le Date(@{body('Current_time')})
@{body('Current_time')
is the current time retrieved from step 2Currently the filter for step 2 does not work. Status eq 'Open'
is fine, however Date_x0020_Due le Date(@{body('Current_time')})
does not work.
I'm guessing this is because OData cannot convert the DateTime object of Current Time into a Date object and is unable to compare them.
How can I change this filter so it returns items that have both a Status of closed and a Date Due of that day or prior?
Upvotes: 0
Views: 5730
Reputation: 159
I somehow solved this.
Status eq 'Open'
@lessOrEquals(ticks(concat(item()?['Date_x0020_Due'], 'T00:00:00Z')), ticks(utcNow()))
Upvotes: 1