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!

Split Date range on quarterly basis

977650Feb 28 2014 — edited Mar 1 2014

 

I Have a requirement in which i have to split the given dates into quarters. it should start from the first_date continuing to last day of quarterly month and end at last_date.

WITH T AS(

SELECT TO_DATE('02/03/2012','DD/MM/YYYY') FIRST_DATE,TO_DATE('26/05/2013','DD/MM/YYYY') LAST_DATE FROM DUAL)

SELECT * FROM T

The quarterly split result that i want should look like this -

FIRST_DATE   LAST_DATE

02/03/2012      30/06/2012

01/07/2012      31/10/2012

01/11/2012      28/02/2014

01/03/2014      26/05/2013

Thanks,

This post has been answered by Partha Sarathy S on Mar 1 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 29 2014
Added on Feb 28 2014
5 comments
1,473 views