sections in the article
This article explains how to use date intervals in the Query Editor.
About the query editor
The Query Editor allows users to build complex and more exact searches.
For more information about the Query Editor and how to search in inriver, read this article.
Searching for date intervals
When you want to use a date to search for an entity, you can use any of the below conditions together with a value.
- Not Equals
- After Or Equals
- Before Or Equals
- Not Empty
If you don't know exactly when an entity was modified or created, you might want to avoid using a static time value to narrow the search down too much. To widen the scope, you can search using a relative value.
To create an interval, select the condition you want to use and pick a relative time value from the drop-down menu.
The query values you select will be applied when the query is triggered. This means that the search will be done in relation to the time when you click the Search button. You can use relative values to make interval searches in the future as well as the past.
The search results will differ depending on how you use the conditions and the interval.
The below images illustrate how to use intervals.
Note: When searching for a date and the condition Equals, the field has to exactly match both date and time.
I have tried it and when I write the sentence it is corrected to a specific date.
In this way, you cannot have a fixed Query that, for example, always shows the items created within the last 14 days.
Is there a method where you can always search "Now + 14 day"?
The way to do this using the Remoting API is by searching for a DateTime FieldType in a Criteria.
FieldTypeId = "<DateTimeFieldType>",
Interval = true,
Operator = Operator.GreaterThan,
Value = "0-h" //Just now
The format on the Value is like this regex, ^\d-[h|d|w]
Please sign in to leave a comment.