Hi everyone,

I'm creating an analysis that subtracts two timestamps and checks if it's equal to a certain number of hours. I may be missing something obvious, but I can't seem to find a way to convert a timespan to an integer value that represents the number of seconds. Or conversely, is there a way I can convert an integer into a time span to use in the logical comparison?

Thanks for any input!

David

Hi David

Please find the expression :

TagName = A

Analysis Variables :

startTime:= PrevEvent('A', PrevEvent('A','*'))

endTime:=PrevEvent('A','*')

TimeDiff:=endTime -startTime

TimeinSec:=Convert(Float(TimeDiff),"s")

TimeinMin:=Convert(TimeinSec,"min")

TimeinHours:=Convert(TimeinSec,"h")

Hope this helps.

Thanks,

Lal