You are in trouble getting with year, month and date ? Don't worry, just run the following script with values and you will get that.
Hopes this helps..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)) ) DAYSFROM DUAL;
No comments:
Post a Comment