Hello
I'm trying to filter 'Get Items' via Filter query by a field name called 'Roster_Date', basically I intend to retrieve any entries with Roster_Date less then 20 days from now.
Expression picked up right date, but output isn't correct. Basically its pull all the entries in the SharePoint list. Ideally output should be about 100 items or even less.
My Flow Snapshot:
list.
Appreciate if you could pin point where the mistake is please .
Hi @Anonymous,
What's the type of the Roster_Date column?
If it is a string column, it couldn't be compared as Date. When Flow run, they are compared as two numbers, for example:
two numbers 04-22-2019 and 03-22-2020, 04-22-2019 will greater than 03-22-2020, cause 04 is greater than 03.
The workaround is to change the Roster_Date column into a Date column. Or change the Roster_Date column's format to "yyyy-MM-dd", then filter query change into Roster_Date le formatDateTime(addDays(utcnow(),-20),'yyyy-MM-dd')
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Filter Query Expression I had used is :
Roster_Date le formatDateTime(addDays(utcnow(),-20),'MM-dd-yyyy')
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional