Skip to content

Date-time search query syntax

July 17, 2011

Scoped search can handle many time and date formats, here are some examples of the date  and time formats that scoped_search accepts:

“30 minutes ago” ,  “1 hour ago” , “2 hours ago”,  Today,  Yesterday

“3 weeks ago” ,  “1 month ago” ,  “6 days ago” , “July 10,2011”

The date can have different separators, “10-July-2011” is going to read the same as “10/July/2010”  or “10 July 2011”

Month name could be the full name or a three letter abbreviation, Jan will read the same as January.

Many other formats are also acceptable, however it is not recommended to use ambiguous formats such as “3/4/2011”

The date time operators are ‘=’, ‘<‘ and ‘>’ the operators should be read as ‘at’, ‘before’ and ‘after’.  This is how the search term interpeted:

The right hand part of a date-time condition is parsed and translated into a specific date-time, “30 minutes ago” is translated to “now – 30 minutes”. “Created > 2011-07-01 12:57:18 EDT” should be read as created after this time.  Note that in the same way: Created > “30 minutes ago”, should read “created after 30 minutes ago” not “created more then 30 minutes ago”.

A search query like “published = yesterday” is translated into a period query, it will be translated in run time to the respective dates. For example, if running on July 18, it could be translated into “(published >= July 17,2011 00:00) and (published < July 18,2011 00:00)”.


From → End Users

Leave a Comment

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

%d bloggers like this: