SharePoint Seach Query: Include or Exclude empty or null dates

This was a tricky one for me. I had to search and figure out by trial and error what works.

To filter out a datetime managed property you could use definition:


Notice the following important things:

  • the minus sign (-) => is to not include someting that is a certain definition
  • ExpirationTime => will be replaced with your managed property name
  • 1900-01-01..{Today} => is a range, the minimum value is the “empty” or “null” value in a SharePoint datetime field. In other words the lowest possible datetime value which is 1900-01-01.


To include “null” or “empty” date time values just remove the minus (-) sign


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s