NQL time selection
In NQL you can specify the time frame in various formats.
NQL during past
The during past
clause allows you to filter your results by specifying a particular time period leading up to the present. The time can be expressed in minutes, hours or days.
Examples:
Retrieving the number of navigations in the past 45 minutes.
Retrieving the number of navigations in the past 12 hours.
Retrieving the number of navigations in the past 3 days.
NQL from to
The from to
clause allows you to apply custom timeframe filters when querying event tables.
Examples:
The number of navigations from June 1, 2023 to June 15, 2023
The number of navigations from June 15, 2023 at 12:30 to June 15, 2023 at 16:15
The number of navigations from 2023-02-01 00:00:00 to 2023-02-28 23:45:00
The number of navigations from 2023-02-01 to 2023-02-28
For more information about the allowed date formats, refer to the NQL data types section. Note that the autocomplete functionality in the NQL editor provides suggestions with available data formats.
NQL on
The on
clause allows you to select a specific day when querying data.
Examples:
The number of navigations on July 15, 2023
Time granularity and retention
When queries involve past time periods, they are converted into specific timeframes. Users have the flexibility to choose the precision level for time selection. Use minutes or hours in NQL time specification to retrieve more granular data. Use days to retrieve less granular data typically covering a longer time span.
Note that data storage and granularity also depend on specific tables. Refer to the Data resolution and retention documentation page for more details.
Time zones
When the Nexthink cloud instance is located in a different time zone from that of the user, the time selection units determine which time zone is considered for defining the beginning and end of the specified time period.
Full-day timeframes (e.g.
during past 2d
,from 2024-02-07 to 2024-02-08
,on Feb 8, 2024
) use the cloud instance timezone.Timeframes expressed in hours and minutes (e.g.
during past 15min
,from 2024-02-07 14:45:00 to 2024-02-08 14:45:00
) use the user timezone.
This distinction applies solely to the time period covered in the query. The results will always be displayed in the time zone of the user.
Example:
Let's consider how this would work in a real-world scenario.
Suppose two Nexthink users query the data using the Nexthink platform set to Eastern Time (ET).
The first user operates in the same time zone as the Nexthink platform. The current time for them is November 11, 05:26:15.
The second user operates in the Central European Time (CET) zone. The current time for them is November 11, 11:26:15.
In such a case, time-related queries made by the second Nexthink user will be translated into the corresponding timeframes, considering the time zone differences between CET and ET. This ensures accurate data retrieval and analytics, regardless of geographical location or time zone.
Last updated