NUMTOYMINTERVAL
NUMTOYMINTERVAL
converts the number x to an INTERVAL YEAR TO MONTH
.
The syntax for the numtoyminterval function is:
numtoyminterval( number, expression )
number is the number to convert to an interval.
expression is the unit. It must be one of the following values: YEAR
or MONTH
.
SQL> select numtoyminterval(10, 'MONTH') from dual;
NUMTOYMINTERVAL(10,'MONTH')
------------------------------------------------------
+000000000-10
SQL> select numtoyminterval(100, 'YEAR') from dual;
NUMTOYMINTERVAL(100,'YEAR')
------------------------------------------------------
+000000100-00
SQL>