I have a document library on SharePoint Online, which has 35,000 documents in it. One of the metadata columns is a date column, and I'd like to be able to search for documents that fall between two dates.

Ordinarily I'd perhaps use a filter on the column, but this won't work for large document libraries because of the 5,000 document view limit of SharePoint. (i.e. not all the date possibilities are listed when you try to filter that column - only the 5,000 that are 'in view'. Plus the fact that you are presented with a huge list of specific dates that appear in the column, and they aren't in date order! So impossible to use really.).

Is it possible to simply create something that allows you to type in 2 specific dates and then search for anything within these dates?


Yes, it's possible to use a date range to search like the below:

size>1000000 AND size<2000000 AND  Created:7/1/2021..7/10/2021

KQL reference can be found here

  • That's really helpful thanks. That works a treat. However, for my own columns, I have a column named DOCUMENT_DATE, and if I try to use something like DOCUMENT_DATE:7/1/2020..10/1/2020 it doesn't return any result, but there are documents with a date within that range? (I'm using UK dates by the way dd/mm/yyyy)
    – Simon
    Oct 1 '21 at 15:19
  • Are these columns 'Site Columns'? May need to check if they have been converted to 'Managed' Properties. Please check here Oct 1 '21 at 19:08
  • Ah, these aren't Site Columns. Do they need to be?
    – Simon
    Oct 4 '21 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.