Skip to Main Content

Analytics Software

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!

Difference between two dates in two rows in different columns

2999116Aug 31 2015 — edited Sep 2 2015

Hi,

Is it possible to get difference between two date values between two rows and different columns?

For example:

(Original Table)

ID |      TYPE     |   DATE1    | DATE2

------------------------------------------------------------

1   |          a        |  1/20/2015 |   (NULL)

1   |          b        |   (NULL)    |   2/20/2015

I am after the difference between date2 and date1.

I've tried to create a union in the analysis where i get both these dates in one column to simplify things but I do not know how to proceed from here.

(Union Analysis Example)

ID |      TYPE     |   DATE3 

--------------------------------------------

1   |          a        |  1/20/2015

1   |          b        |  2/20/2015

Any ideas if this is possible?

        Thanks,

        Allan

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details