The queryTimeRange() operator calculates the time range of a message. It returns the time duration for the query being executed in milliseconds. You can use it to establish time ranges for your continuous queries (CQs). This is a preferred operator for queries that are run in live dashboards or real time scheduled searches since it is more accurate than queryStartTime() and queryEndTime() operators in these cases.
queryTimeRange() as [alias]
- An alias is required.
To get the range of time for your queries:
| queryTimeRange() as range