Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to convert the following code to last day of previous two years?

syed haiderApr 30 2018 — edited May 3 2018

I want to obtain the last day of the previous two years.

I have following code, which is giving me "12/31/2016". Whereas, I want "12/31/2015". What do I need to do to get the desired result.

LAST_DAY(ADD_MONTHS(TRUNC(TRUNC(Report_End_Date , 'Year')-2 , 'Year'),11))

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2018
Added on Apr 30 2018
14 comments
1,579 views