Expression returning 3 dots (elipsis -> ...)

I have a very simple OEE module (I think it was working properly) but some minutes ago the expression I used for it is returning (…) and now the OEE “component” I made is showing 0

P.S. unseen on the left is just the root of my tag for the number of good parts (which is correct). It just suddenly stopped working, does it maybe have something to do wit the format of time?

(({nGoodParts.value}*0.87)-69)/secondsBetween('06:00:00', now())*100 


Your time isn’t specific enough and it needs to include the date. Try this:

( ({nGoodParts.value} * 0.87) - 69) / secondsBetween(
) * 100
1 Like

Thanks! I forgot to mark it as solved.
I used the dateFormat expression function

(({nGoodParts.value}*0.87)-69)/secondsBetween(dateFormat(now(),'yyy-MM-dd 06:00:00'), now())*100
1 Like

Working is working, but the types don’t match for some of these functions. dateFormat returns a String. The first argument of secondsBetween should be a Date. Ignition is probably doing the conversion for you implicitly, but @Transistor’s solution uses the correct data types. I’d expect it to be more robust and possibly more performant for that reason.


The man has spoken!

It’s true what you say, I had not thought about that insight. Although technically a string can be easily coerced into date type when properly formatted (I think)