Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Number Of Days Between Two Dates In Same Column

I have to find the number of days between the dates for the same cu_id and add the number as a new column. The new table should look like this.

Cu_id |Tr_id |Date| Days_between
1234 |1 |12/3/2006 |0
1234 |2 |12/18/2006 |15
1234 |3 |1/5/2007 |18
1234 |4 |1/9/2007 |4

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Hi Shariel,

see the attached example (sorry for the typo: use ABOVE and not BEFORE).

Be shure that your dat format is correct.

Good luck!

Rainer

View solution in original post

5 Replies
Not applicable
Author

Hi,

try Date - Before(Date) for your new column.

Rainer

Not applicable
Author

Tks Rainer Filoda but im a newbie, it doesnt work , i have differents Cu_Id
Regards

Not applicable
Author

Hi Shariel,

see the attached example (sorry for the typo: use ABOVE and not BEFORE).

Be shure that your dat format is correct.

Good luck!

Rainer

Not applicable
Author

it works perfectly

Thank you very much!

Not applicable
Author

Thank for your help, but I have one more doubt, if I do not have the field Tr_Id could I generate it?

Regards