1 2009-2-3
1 2009-2-5
2 2010-1-2
2 2010-3-4
以上为data format, 想求平均第一次购买和第二次购买的时间间隔,平均第二次购买和第三次购买时间间隔,。。。。。
谢谢

|
楼主: nancy911
|
4085
9
SAS code 求救 |
|
大专生 73%
-
|
回帖推荐data crackman;
input customerid purchasetime $@;
year=input(substr(purchasetime,1,4),F4.);
month=input(substr(purchasetime,6,7),F2.);
day=input(substr(purchasetime,8,9),F2.) ;
date=mdy(month,day,year);
drop year month day;
cards;
1 2009-2-3
1 2009-2-5
2 2010-1-2
2 2010-3-4
3 2010-9-6
3 ...
本帖被以下文库推荐
| ||
|
|
| ||
| ||
| ||
| ||
| ||
|
Let them be hard, but never unjust
|
||
| ||
|
|
||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


