FilterValueByCycle
简述
按照周期取数据
FilterValueByCycle(t:TableArray;BegT:TDateTime;EndT:TDateTime;CycleName:String):TableArray
名称 | 类型 | 说明 |
---|
t | TableArray | 数据表,必须含有’time’字段 |
BegT | TDateTime | 日期型时间,选取开始时间 |
EndT | TDateTime | 日期型时间,选取截止时间 |
CycleName | String | 字符串,周期函数 |
返回 | TableArray | 返回按照周期取的数据 |
SetSysParam(PN_Stock(),'SZ000002');
SetSysParam(PN_DATE(),IntToDate(20121029));
t:=Nday(20,'time',datetoint(sp_time()),'c',close());
FilterValueByCycle(t,inttodate(20120918),IntToDate(20121029),cy_week());
return t;
//结果:
