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!

Sql query to get the last sunday of the previous year for a given year and month

1045153Nov 16 2017 — edited Nov 16 2017

Hi All,

I have a  requirement  to  fetch the last sunday for a  given year  and month.

here is the example;

If I pass the  year  2017 & Oct  29th as 29th is the last sunday in the month, I need to get the result  of  30 oct  2016, because  last sunday in a month of oct for the year 2016 is   30 oct 2016.

Please  help me with the sql query. Thanks  a  lot in advance.

Thanks,

Babu.

This post has been answered by Frank Kulash on Nov 16 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2017
Added on Nov 16 2017
3 comments
506 views