Hi,
I'm having issues with Date filter query with Get Items. I'm trying to bring back results based on a next review date. I'm trying to test on a particular date I know exists in the review date field in a Library. To do this I'm setting a variable with the following formula
Any tips on what I'm doing wrong would be great as its driving me mad.
Could you show us your code? The sample you pasted in a previous reply is using eq (Equals)
Hi thats what ive basically done
To get a specific date that contains a time portion you'll need to test whether its greater than yesterday at midnight and more than today at midnight.
Its seems on this particular site some items wont filter without having the time portion adding to the query which frustrating because how can you set a date wit the exact time portion. Amending the date either side of the date dosen't work either
Try testing with Next_x0020_Review_x0020_Date eq '2022-05-13' . You could be running into an issue with time conversion. Remember time and date fields are stored with a time component even if they are set for Date only.
If I test the get items filter with this query I get the relevant document back
Next_x0020_Review_x0020_Date eq '2019-08-08'
I test with Next_x0020_Review_x0020_Date eq '2022-05-14' I don't get a result back even though that date exists int he Library. So I'm puzzled whilst one query works but the other one dosen't
utcnow() doesn't take a specific date as the parameter. It takes a date format like this
utcNow('yyyy-MM-ddTHH:mm:ss')
If you want a future date then you need to use FormatDateTime and AddDays something like this
formatDateTime(addDays(utcNow(),22),'yyyy-MM-dd')
This would give you a date 22 days in the future from now.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492