Skip to main content
Sumo Logic

queryTimeRange()

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.

Syntax

  • queryTimeRange() as [alias]

Rules

  • An alias is required.

Examples

To get the range of time for your queries:

error
| queryTimeRange() as range