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!

generate dates

cs01kksNov 8 2018 — edited Nov 9 2018

Hi,

I have a requirement to generate dates(daily date) starting from today till next 5 years. Month number should be assigned for each day/date. The logic for that is: a Month starts from Monday(if monday is starting from previous month, then that date will be start of the month) and month ends on last sunday of the month.

As an example: Oct 29 2018 is start of the month and will be assigned as 11th month and Nov 25 2018(last sunday) will be end of the month. I have attached the image for this example. Please advice on an approach to achieve this. I appreciate your inputs.

Thanks

kumar

Nov 26 2018 will be start of month and will be assigned 12th month and Dec 30 2018 will be end of month.example_dates1.PNGexample_dates2.PNG

This post has been answered by mathguy on Nov 8 2018
Jump to Answer
Comments
Post Details
Added on Nov 8 2018
14 comments
672 views