现有数据集中有2个时间字段,都是精确到秒的,第一个是事件发生时间,第二个是结束事件,求中间间隔时间,结果显示为多少分多少秒。
具体数据集如下:
data aaaa;
input serv_id $ otherpart $ comm_type $ start_time datetime19.  end_time datetime19. ;
informat 
serv_id $2.
otherpart $2.
comm_type $2.
start_time datetime19.
end_time   datetime19.;
format
serv_id $2. 
otherpart $2.
comm_type $2.
start_time datetime19.
end_time   datetime19.;
cards;
a b 1 10NOV2012:03:40:19 10NOV2012:03:59:19
a c 1 10NOV2012:04:40:19 10NOV2012:05:15:19
a b 0 22NOV2012:16:22:11 22NOV2012:16:22:11                                
b a 1 02NOV2012:09:49:13 02NOV2012:09:59:19
c b 1 02NOV2012:13:00:19 02NOV2012:13:12:19
d l 0 26NOV2012:23:49:19 27NOV2012:01:59:19
;
run;