Forum Discussion
How to do search in list for date range
Hello Avi65
in search queries you can use different date intervals. Here are an overview about supported date intervals in KQL: https://learn.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference#relevant-date-intervals-supported-by-kql
Best, Dave
- Avi65Apr 27, 2023Brass ContributorHello Dave,
I already gone thru this and tried as well example of lastmodifiedtime and it is working too, but as I mentioned it is not working for custom field i.e. PlantDate as expected. It might be it is custom field not a managed metadata field, where lastmodifiedtime is a metadata field.
Avian- DaveMehr365May 03, 2023MVP
Hello Avi65
i have tested it and it works with custom date columns.
I have mapped my date and time columns to RefinableDate columns. My example with query:
{SearchTerms} Path:"<TENANT>/sites/MSTEvents/Lists/SessionTracker/" RefinableDate01>2022-01-01 AND RefinableDate02<2022-01-31
Best regards, Dave
- Avi65May 03, 2023Brass Contributor
Hello David,
Seems you misunderstood my question. In any list allitems.aspx there is search on title bar. You can do any keyword search for the particular currently opened list. As I said it is working it is for last modified date (LastModifiedDatetime>2022-01-01 AND LastModifiedDatetime<2022-01-31) in keyword search box, but not working for (customfield>2022-01-01 AND customfield<2022-01-31).
I hope it is clear.