Search for Documents within a Specified Date Range
The docdate() function finds documents within a certain date range.
Syntax
The optional parameters restriction type, date_1, date_2 are used to set a target date range. The parameters date_1, date_2 should be in "mm/dd/yyyy" format.
The restriction_type parameter defines the type of comparison and accepts one of the following values:
Restriction type |
Comments |
lt/less/< |
Document date is less than date_1. |
le/less or equal/<= |
Document date is equal to or less than date_1. |
gt/greater/> |
Document date is greater than date_1. |
ge/greater or equal/>= |
Document date is equal to or greater than date_1. |
eq/equal/= |
Document date is equal to date_1. |
ne/not equal/!= |
Document date is not equal to date_1. |
bt/between/() |
Document date belongs to an open range (date_1, date_2). |
be/between or equal/[] |
Document date belongs to a closed range [date_1, date_2]. |
lo/left-open/(] |
Document date belongs to a left-open range (date_1, date_2]. |
ro/right-open/[) |
Document date belongs to a right-open range [date_1, date_2). |
If the restriction type includes mathematical symbols (>, (), !=, etc.), they should be enclosed in quotes (">", "()", "!=", etc.).
Example
The function also accepts the optional named parameters year, month, day, hour, minute, second that limit the query to a particular year, month, day, hour, minute or second. When using these parameters, other arguments in the function should be omitted.
Note
The function requires a date and time column to be set in the Index node properties.

Task example: Searching for reviews within a specified date range
Users can write the following query expression to find all customer reviews from the first May 2019 till the 31st May 2022:
docdate("[]", "05/01/2019", "05/31/2019") = docdate("()", "04/30/2019", "06/01/2022")

Users could also limit their search to a specific day:
docdate("=","05/7/2022")

If users are interested in finding occurrences of a certain word within a certain date range, they can write a query specifying a time period, as well as the word they are looking for:
"customer review" and docdate("[]", "05/05/2023", "07/05/2023").
