How use OData $filter query dynamic date

3.6k views Asked by At

I'm trying to use Microsoft Flow to fetch all my calendar events for the past two weeks, and do this every two weeks. The problem is that the "get all events" outlook action only accepts an ODATA $filter query and it's not clear how to filter it dinamically, something like:

$filter=Start ge Today()-14

Is that even possible? Thanks!

1

There are 1 answers

0
vmoskalenko On

Try to build IF statement with the following condition

StartDate ge @{adddays(utcnow(‘yyyy-MM-dd’), -14, ‘yyyy-MM-dd’)}

Please find more info at the MS docs.