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!

Days between 2 dates

AHMADMar 18 2012 — edited Apr 16 2012
Dear;
I Need code to separate days from 2 dates
for example:
first date 1/1/2012 ---- second date 5/1/2012
i need code to give a output like
1/1/2012, 2/1/2012, 3/1/2012, 4/1/2012, 5/1/2012

I found this code:
Select To_Date('01-01-2012', 'Dd-Mm-Yyyy') + Rownum -1 New_Days 
    From Dual 
 Connect By Level <= To_Date('05-01-2012', 'Dd-Mm-Yyyy') - To_Date('01-01-2012', 'Dd-Mm-Yyyy') + 1;
but i need the result like---> every date in separate column.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 14 2012
Added on Mar 18 2012
7 comments
128 views