to_nanoseconds¶
Description¶
Convert a duration to a number of nanoseconds. The input is always of type duration, the output is a float64 representing the number of nanoseconds (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_nanoseconds( duration )
Argument |
Type |
Required |
Multiple |
Constant |
---|---|---|---|---|
duration |
duration |
Required |
Only one |
Variable |
Examples¶
make_col nanoseconds:to_nanoseconds(stopTime - startTime)
Assuming stopTime and startTime are timestamps, subtracting them yields a duration.
That duration is then converted to number of nanoseconds using to_nanoseconds
.