TO_INTERVAL()

Scalar. Converts a given value to an Interval.

Syntax

TO_INTERVAL( value )
Parameter

value

A value representing a number of microseconds. Strings must follow the format for an Interval literal. See Time Literals for more information.

Data Types

Return

value

Interval

Long

Float

Interval

String

Examples

The following example computes an Interval value from the value in a column representing microseconds:

INSERT INTO OutStream
SELECT TO_INTERVAL(Devices.MicrosecsSinceReset)
FROM Devices;

The following example computes an Interval value from a String literal:

INSERT INTO OutStream
SELECT TO_INTERVAL('1 02:03:04.567890')
FROM InStream;