NQL time_elapsed()
The time_elapsed()
function calculates the time elapsed since an event. The function returns the values in seconds.
Use this function with a field of datetime data type, for example:
the
last_seen
field from thedevices
tabletime
from thedevice_performance.boots
table
Using with the ‘where’ clause
Use the time_elapsed()
function in a where
clause.
Example:
Retrieve the list of devices where the last operating system update was more than 15 days ago.
Using with the ‘list’ clause
Use the time_elapsed()
function in a list
clause.
Example:
List devices and the time elapsed from their last startup.
Using with the ‘compute’ clause
Use the time_elapsed()
function in a compute
clause.
Example:
List devices and the time elapsed from their last startup. Applying chaining of functions (call multiple functions on the same field).
Last updated