Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Casts an expression to a duration value.

duration(x:string) -> duration

The duration function casts the given string x to a duration value.

from {str: "1ms"}
dur = duration(str)
{str: "1ms", dur: 1ms}

Last updated: