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

1.3 KiB

title description aliases weight flux/v0.x/tags related introduced removed
toDuration() function The `toDuration()` function converts all values in the `_value` column to durations.
/influxdb/v2.0/reference/flux/functions/transformations/type-conversions/toduration
/influxdb/v2.0/reference/flux/functions/built-in/transformations/type-conversions/toduration/
/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toduration/
/influxdb/cloud/reference/flux/stdlib/built-in/transformations/type-conversions/toduration/
102
type-conversions
transformations
/flux/v0.x/data-types/basic/duration/
/flux/v0.x/stdlib/universe/duration/
0.7.0 0.37.0

{{% warn %}} toDuration() was removed in Flux 0.37. {{% /warn %}}

The toDuration() function converts all values in the _value column to durations.

toDuration()

Supported data types: String | Integer | Uinteger

{{% note %}} duration() assumes numeric input values are nanoseconds. String input values must use duration literal representation. {{% /note %}}

Parameters

tables

Input data. Default is piped-forward data (<-).