MONTHS_BETWEEN returns an integer specfiying the number of months between two dates.

The result can be either positive or negative depending on which date is greater.

Example:

SELECT MONTHS_BETWEEN(10-JAN-2036′, ’10-JAN-2004′ ) AS RESULT FROM DUAL;

RESULT
——————-
384

MONTHS_BETWEEN – Oracle SQL Function