AnsweredAssumed Answered

How can I use Analyses to find the difference between two timestamps in seconds

Question asked by Ian.Gore on Feb 14, 2015
Latest reply on Feb 16, 2015 by Mike Zboray

I'm trying to use Analyses to find out how long go a tag was updated in seconds.

 

I've an attribute "Input Tag" which uses a PIPoint DR.  I can get the time difference between "now" and the tag update time using an analyses like this.

 

ParseTime("*") - PrevEvent('Input Tag', ParseTime("*"))  which gives me a "TimeSpan"

 

If the Timespan is less than a day I can get the number of seconds like this....

 

DaySec(ParseTime("t") + (ParseTime("*") - PrevEvent('Input Tag', ParseTime("*"))))

 

However if the timespan is greater than a day (eg 11.03:42:31) then it won't work properly.

 

Is there a function that converts to UTC seconds or something? 

Outcomes