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!

Find Last Tuesday

MaheshBJan 12 2016 — edited Jan 12 2016

Hi,

I have a requirement where i need to derive last tuesday date .

For example consider below table.

12-Jan-16Tuesday
13-Jan-16Wednesday
14-Jan-16Thursday
15-Jan-16Friday
16-Jan-16Saturday
17-Jan-16Sunday
18-Jan-16Monday
19-Jan-16Tuesday
20-Jan-16Wednesday
21-Jan-16Thursday
22-Jan-16Friday
23-Jan-16Saturday
24-Jan-16Sunday
25-Jan-16Monday

f i am executing query on 18 Jan or 15 Jan or 19-Jan-16 it should return me 12-Jan-16.

If i execute 25-Jan-16 ,21-Jan-16 it should return me 19-Jan-16.

any date format would do.

Experts can you please give any pointers how can i form select statement forĀ  this ?

Regards,

Mahesh

This post has been answered by BluShadow on Jan 12 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2016
Added on Jan 12 2016
26 comments
8,023 views