data have;
input client $ date1 date9. event1 $
date2 date9. event2 $
date3 date9. event3 $
imp1: date9. imp2: date9. imp3: date9. ;
format date: imp: date9. ;
datalines ;
12345 01JAN2020 CREATION 01APR2020 CREATION 01JUL2020 PROLONGATION 01MAR2020 01MAY2020 01SEP2020
;
Hello,
happy new year !
For each imp, I would like to calculate the duration between the imp date and the greatest event among the creation event
thanks a lot in advance
delay1 of the imp1 = 2 = from january to mars (event 1 is the begining)
delay2 of the imp2 = 1 = from april to may (event 2 is the begining)
delay3 of the imp3 = 5 = from april to september (event 2 is the begining, event3 is ignored because not creation)
... View more