Epoch Time subtraction

So in my function node,

msg.payload = msg.payload - msg.payload;
return msg;

Is that correct? As with that I'm just getting 0, when it should be 3500

no, that would never work.

Imagine msg.payload equalled 123. Then 123 - 123 is always 0

Show me the output of the join node. AND/OR share your flow as previously asked

1 Like

All makes sense. It wasn't working due to the fact that I had a split node included too - therefore the payload message wasn't getting through from both sides.

Removing the split node and copying the path from the join node and placing them in the function allowed me to do the subtraction.

Thanks so much for taking the time Steve.

Best wishes

No bother.

Please mark the answer that best suits your solution (even if that is your post)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.