duration

Description

Convert a number or timestamp, or a time interval, to a duration. Numbers are assumed to be nanoseconds

Return type

duration

Domain

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

Categories

Usage

duration( timestamp )

Argument

Type

Required

Multiple

timestamp

timestamp

Required

Only one

duration( number )

Argument

Type

Required

Multiple

number

numeric

Required

Only one

duration( start_timestamp, end_timestamp )

Argument

Type

Required

Multiple

start_timestamp

timestamp

Required

Only one

end_timestamp

timestamp

Required

Only one