docs-v2/content/flux/v0.x/stdlib/universe/today.md

1.6 KiB

title description menu weight flux/v0.x/tags introduced
today() function `today()` returns the now() timestamp truncated to the day unit.
flux_0_x_ref
name parent identifier
today universe universe/today
101
date/time
0.116.0

today() returns the now() timestamp truncated to the day unit.

Function type signature
() => time

{{% caption %}}For more information, see Function type signatures.{{% /caption %}}

Examples

Return a timestamp representing today

option now = () => 2022-01-01T13:45:28Z

today()// Returns 2022-01-01T00:00:00.000000000Z


Query data from today

from(bucket: "example-bucket")
    |> range(start: today())