AnsweredAssumed Answered

Timespan formatting (RtReports / Vision / Processbook)

Question asked by wdevriese on Dec 11, 2017
Latest reply on Dec 12, 2017 by wdevriese

Hi,

 

In a Pi Project of ours, "elapsed time" is being saved as an attribute in the designated eventframe. (note: elapsed time is unrelated to the eventframe duration)

Since there is no timespan datatype (only aftimespan for use in the sdk)  I've stored the elapsed time as seconds, in an int64 attribute.

 

In RtReports (+ pi vision & processbook), I'm trying to format the attribute value to a more readable format "hh:mm:ss".

Does anyone know how to do this?

 

Storing my elapsed time as a string attribute seems undesirable , but the AFtimespan Parse(String, IFormatProvider) method in the sdk seems to suggest that this isn't that a bad idea?

Outcomes