15.3.3 numtoyminterval(value1, value 2)

NUMTOYMINTERVAL(n,interval_unit) - Function converts n to an INTERVAL YEAR TO MONTH literal. The value for interval_unit specifies the unit of n and must resolve to one of the following string values:YEAR, MONTH.

Value 1 can be one of the following types: big integer, double, integer, float.

Value 2 can be one of the following types: text.

Returned value will be of type intervalym.

Function Result

numtoyminterval(10.5, "YEAR")

10 yy 6 mm

numtoyminterval(34, "MONTH")

2 yy 10 mm