Date math syntax - Alfresco Search Services - 2.0 - 2.0 - Ready - Alfresco - external - Alfresco/Alfresco-Search-Services/2.0/Alfresco-Search-Services/Using/Full-text-search-reference/Search-using-date-math/Date-math-syntax - 2025-04-04

Alfresco Search Services

Platform
Alfresco
Product
Alfresco Search Services
Release
2.0
License

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:

NOW+2MONTHS

To represents a point in time one day ago, use:

NOW-1DAY

A slash is used to indicate rounding. To represents the beginning of the current hour, use:

NOW/HOUR

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:

NOW+6MONTHS+3DAYS/DAY

While date math is most commonly used relative to NOW, it can be applied to any fixed moment in time as well:

1972-05-20T17:33:18.772Z+6MONTHS+3DAYS/DAY
Note: Solr 6 date math supports TODAY.