diff --git a/docs/query_builder.pod b/docs/query_builder.pod index b0ce1c4678d..af2787273b9 100644 --- a/docs/query_builder.pod +++ b/docs/query_builder.pod @@ -422,6 +422,47 @@ tickets the transactions should be on. In our example, we probably only want to see active tickets, so in the bottom Ticket Fields section you can select Status "is" and "Active". This will then filter out inactive statuses. +=head2 Searching on Date fields + +It is a common use case to search tickets based on when they were created, +resolved, or last updated. + +In the query builder, you can pick the Date or DateTime field you want to +search on and then pick one of the comparison operators (before, on and +after). You can then click on the value field and pick a date from the +calendar that appears. + +=head3 Relative Dates + +Alternatively, you can also build search templates with relative dates +such as "today", "yesterday", "tomorrow", "last week", "next month", and +even more complex dates such as "beginning of last month". + +To use relative dates, you can type them directly into the value field +of the search builder. + +For example, if you want to search for tickets created during the current +week, you can use the following search criteria: + + Field: Created + Operator: after + Value: last Sunday + +Another helpful example is to search for tickets resolved during the last +month. You can use 2 criteria to do that: + + Field: Resolved + Operator: after + Value: beginning of last month + + Field: Resolved + Operator: before + Value: this month + +You can check all compatible relative date strings that RT supports at +L and L. + + =head1 Advanced In addition to the graphical query builder, RT also has an Advanced page