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!

Date Function to get Previous week

user480947Jun 23 2009 — edited Jun 23 2009
Is there a date function to get

Let us say today is 23rd of Jun 2009
I want a date function to get previous Thursday 18 Jun 2009
and another function which get 7 days before which is Friday 12 Jun 2009.

FYI: For the current week, I was able to use:
select next_day(case to_char(sysdate,'Day') when 'Thursday' then trunc(sysdate-1) else trunc(sysdate) end, 'Thursday')
from dual;
select next_day(trunc(sysdate-7), 'Friday') from dual;

I want something similar to that.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2009
Added on Jun 23 2009
5 comments
3,537 views