I have calculated Hrs in Last month . output is in timestamp & now i want to use this 744 in other calulation . Like if we substract this with other PI tag it gives output as below . how should i can directly substract from 744?


image.png

image_1.png

Parents
  • I was always disappointed that then-OSIsoft did not make their own Asset Analytics UOM-aware. I often stated that (timestamp2 - timestamp1) should not return a scalar number, but rather should return a number with a UOM of seconds. Instead it is left to each person to do this on their own.

    That said, I would suggest using:

     

    Name: DeltaSeconds

    Expression: Convert(Variable2 - Variable1, "s")

     

    Name: DeltaHours

    Expression: Convert(DeltaSeconds, "h")

     

    The first convert really does not convert but simply assigns a UOM.

     

Reply
  • I was always disappointed that then-OSIsoft did not make their own Asset Analytics UOM-aware. I often stated that (timestamp2 - timestamp1) should not return a scalar number, but rather should return a number with a UOM of seconds. Instead it is left to each person to do this on their own.

    That said, I would suggest using:

     

    Name: DeltaSeconds

    Expression: Convert(Variable2 - Variable1, "s")

     

    Name: DeltaHours

    Expression: Convert(DeltaSeconds, "h")

     

    The first convert really does not convert but simply assigns a UOM.

     

Children
No Data