知识库 > 金融建模 > 公用函数 > 金融工程 > 指数研究 > 中间函数

FilterValueByCycle    

简述
按照周期取数据
定义

FilterValueByCycle(t:TableArray,BegT:TDateTime,EndT:TDateTime,CycleName:String):TableArray
参数

t:数据表,必须含有’time’字段
BegT:日期型时间,选取开始时间
EndT:日期型时间,选取截止时间
CycleName:字符串,周期函数

返回:返回按照周期取的数据
  • 范例:

      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;

    //结果:

相关