Hi @Tim
I'm glad to hear you solve the problem, if you have any issue about SharePoint, you are welcome to raise a ticket in this forum.
By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:
Issue Symptom:
I want to be able to run a recurring query where I get all documents with a Modified time of 'today', every day in some script. Now trying a search in the search area like this:
LastModifiedTime="today"
Only gives me back the image.png
So I try something like this:
LastModifiedTime >= "2022-10-01"
Same thing, only the image comes back.
Now then I try this for several searches:
LastModifiedTime >= "2022-07-01" (nothing, only image)
LastModifiedTime >= "2022-06-01" (nothing, only image)
Then comes '2022-05-01' and suddenly, I get returned 'testimg.png', 'testdoc1.pdf', 'testdoc2.pdf'. Ok weird, so now I get back 2 of the three pdfs. Then 2022-04-01 nothing is added. 'LastModifiedTime
= 2022-03-01' I finally get all documents.
Now these docs are named from different documents for which I don't know when they were initially added to Sharepoint, it's not like I created them today. However, I was thinking that the LastModifiedTime query would work on the time in the 'Modified' column, which now does not seem to be the case. My thinking is that it looks at something else, but how do I then run a query like this on the 'Modified' column?
Current status:
I am now using: LastModifiedTimeForRetention >= "2022-10-01". This does seem to work in my case for matching the 'Modified' column!
You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.