You would need the following in order to do a Time Filter calculation using PI-Datalink
EXPRESSION,START TIME, END TIME
From what I can understand is that you are having difficulty writing the correct expression. Try the following as an expression
EXPRESSION#1
('TAG1')=2000
This expression will tell you how long this expression was true, depending on your selection it could be sec,min,hours or days.......
EXPRESSION#2
Part1
FindEq('TAG1','*-1s','*',2000)
This will give you the lastest timestamp when TAG1=2000
Part2
TimeEq('TAG2',FindEq('TAG1','*-1s','*',2000),'*',1)
This part will give you total seconds since Expression#2,Part1 enter a true state till the current time.
I hope this will put you on the right path, I don't expect it to solve your problem though, good luck and keep us posted.