to_days

Description

Convert a duration to a number of days.

The input is always of type duration, the output is a float64 representing the number of days (whole and fractions) of that duration.

Return type

float64

Domain

This is a scalar function (calculates a single output value for a single input row.)

Categories

Usage

to_days(duration)

Argument

Type

Optional

Repeatable

Restrictions

duration

duration

no

no

none

Examples

make_col days:to_days(stopTime - startTime)

Assuming stopTime and startTime are timestamps, subtracting them yields a duration. That duration is then converted to number of days using to_days.