You are here

Search using date math

The date field types in Solr support the date math expressions.

The date math expression makes it easy to create times relative to fixed moments in time and includes the current time which can be represented using the special value of NOW.

Date math syntax

The date math expressions consist either adding some quantity of time in a specified unit, or rounding the current time by a specified unit. Expressions can be chained and are evaluated left to right.

For example, to represents a point in time two months from now, use:
To represents a point in time one day ago, use:
A slash is used to indicate rounding. To represents the beginning of the current hour, use:
To represent a point in time six months and three days into the future and then rounds that time to the beginning of that day, use:
While date math is most commonly used relative to NOW, it can be applied to any fixed moment in time as well:
Note: Solr 6 date math supports TODAY.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.