Hi Experts,
I have a scenario where i need to calculate No. of years and No. of months between 2 dates.
I have calculated no of days between 2 dates using this conversion.
interval_to_char(sysdate()-PURCHASE_DT,'D')
For eg. Suppose no of days is 765 then in YEAR column 2 should be mapped and in MONTH column 1 should be mapped.
No. of Days Year Month
765 2 1
For Year i have used this:
floor(cast(interval_to_char(sysdate()-PURCHASE_DT,'D'),'INT')/365)
Please help me with Month Column.
Thanks
Neha Khetan