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!

Previous six months

SainaaJun 26 2020 — edited Jun 26 2020

Hello I am trying to pick previous six months from any given day.

SELECT  add_months(trunc(to_date(20200615,'yyyymmdd'),'MM'),-6) FROM dual

But this query only giving me first date of previous 6 months.

What I want is 2019/12/15 from this query.

This post has been answered by BrunoVroman on Jun 26 2020
Jump to Answer
Comments
Post Details
Added on Jun 26 2020
2 comments
5,212 views