SELECT TRUNC (MONTHS_BETWEEN (:end_date, :start_date) / 12)
|| ' YEARS '
|| MOD (TRUNC (MONTHS_BETWEEN (:end_date, :start_date)), 12)
|| ' MONTHS '
|| ( TO_DATE (:end_date)
- ADD_MONTHS (:start_date,
TRUNC (MONTHS_BETWEEN (:end_date, :start_date))
)
)
|| ' DAYS'
FROM DUAL;
No comments:
Post a Comment