MONTHS_BETWEEN(x, y): get the number of months between x and y.
SQL> SQL> SELECT MONTHS_BETWEEN('25-MAY-2005', '15-JAN-2005') FROM dual; MONTHS_BETWEEN('25-MAY-2005','15-JAN-2005') ------------------------------------------- 4.32258065 SQL> SQL> SQL>