now() Query Function

Assigns the current value as milliseconds since 1970.

When used in a non-live query, the value of now is fixed to when the query was issued. For live queries, the value of now depends on where in the query it is placed. If it is placed before the first aggregate function, it is only evaluated the first time the query sees the event. If it is placed after the first aggregate function, it is evaluated continuously, and gives the live value of the current system time, which can divert between Humio nodes.

Parameters

Name

Type

Required

Default

Description

as

string

No

_now

Name of output field.

The implied parameter is as.

Examples

Assign curr the value of now

humio
curr := now()

Use now() in an assignment

humio
isOld := (now()-@timestamp) > 1000