Definition: The Oracle PL/SQL NUMTODSINTERVAL function converts an input number to its specified Interval Day to Second Unit equivalent. The allowed interval units can be DAY, HOUR, MINUTE, or SECOND. The return type of the function is INTERVAL.

Example Syntax:

NUMTODSINTERVAL(n, interval unit)

Note that the interval unit is case insensitive.

Example Usage:

The SQL queries below show the output for conversion of numeric value 1 into provided Interval units.