PIDatalink function PITimeFilterVal

Discussion created by Alexis on Jun 10, 2014
Latest reply on Jun 15, 2014 by Daniel Takara
Hi Community,
I would to know if there is an equivalent function for the PITimeFilterVal(PIDatalink)   for pioledb tables.
declare @s_Expression varchar(MAX)
declare @s_StartTime datetime2
declare  @s_EndTime datetime2
declare @s_Mode varchar(80)
declare  @i_OutCode int
declare @s_PIServer varchar(80)

set @s_Expression = '(''210CRG001RS.CRU''="Stop" and ''210CRG001RD.CRU''="READY") or (''220CVB001RS.CRU''="Stop") or (''210SIFEA001B.CRU''<2)'
set @s_StartTime = '2012-12-31 06:59:00'
set @s_EndTime= '2013-11-08 06:59:00'
set @s_Mode = 'days'
set @i_OutCode =1
set @s_PIServer ='pi-server'

SELECT &#91;expr]
  FROM &#91;PIOLEDB].&#91;piarchive]..&#91;picalc]
 where &#91;expr] = @s_Expression
  and &#91;time] >= @s_StartTime 
  and &#91;time] <=@s_EndTime
Thanks in andvance   :)