Skip to main content

queryTimeRange Search Operator

The queryTimeRange() operator 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 run in auto refresh dashboards or real time scheduled searches since it is more accurate than queryStartTime() and queryEndTime() operators in these cases.

Syntax

queryTimeRange() as <field>

Rules

  • An alias is required.

Examples

To get the range of time for your query:

error
| queryTimeRange() as range
Status
Legal
Privacy Statement
Terms of Use

Copyright © 2024 by Sumo Logic, Inc.