to_interval()

Scalar. Converts a given value to an interval.

Syntax

to_interval ( value )

Parameters

value

A string, long, float, or interval representing a number in microseconds. Strings must follow the format for an interval literal.

Usage

Converts a given value to an interval. The function takes a string, a long, or a float as its argument, and the function returns an interval. Note that the function can also take an interval as its argument, but it will return the same interval.

Example

to_interval( '1234' ) returns 1234.