data temp1;
length type 8;
set temp;
do i=1 to &n;
if &starttime+(i-1)*&m<=xx<=&starttime-1+i*&m then type=i;
end;
drop i;
proc sort data=temp1 out=temp2;
by type;
run;
data result;
set temp2;
by type;
if first.type then output;
drop type xx;
run;
%mend;
%a(20050905,07:00:00,15);作者: shiyiming 时间: 2008-1-11 12:07 标题: Re: [求助]如何挑数据 太谢谢楼上的了,感激不尽