Search macros
Last updated
When you define a custom "search" (Manage Keys/search/edit searches), you can use any of the macros in the table below in the SQL field. These macros are automatically replaced when the search is performed.
List of supported macros:
Macro | Description |
[today_start] | 12:00:01 AM of the current day |
[today_end] | 11:59:59 PM of the current day |
[yesterday_start] | 12:00:01 AM yesterday |
[yesterday_end] | 11:59:59 PM yesterday |
[last_month_start] | 12:00:01 AM on the first day of the previous month |
[last_month_end] | 11:59:59 PM on the last day of the previous month |
[this_month_start] | 12:00:01 AM on the first day of the current month |
[this_month_end] | 11:59:59 PM on the last day of the current month |
[date] | Date the scheduled task last ran |
You can use + or - arithmetic operations within a macro. When using arithmetic operators the default unit is days. For example, the macro to [today_start+5] effectively means [today_start + 5 days].
The following units are available to control the increments: d (default), h (hours), m (minutes), s (seconds), and M (months - available as of QLM v16.0.2250.1)
Examples:
[today_start-5] is equivalent to 5 days ago.
[today_start+5] is equivalent to 5 days from today.
[today_start+5d] is equivalent to 5 days from today.
[this_month_start-3M] is equivalent to 3 months ago.