Format datetime to linux epoch number

Hi there,
I am not sure how to approach this problem, I have devices where several attributes are Numbers (they are date times but because there is not that type I figured I will store in linux epoch) representing date time.

When I go and need to update the device status I need handlebar to convert the string datetime to a linux epoch (msec integeger).

I was looking at format helpers and I couldn’t find any suited for this use case.
What’s the best way to solve the problem?

The {{formatDate}} helper didn’t work? It sounds like your use case is perfect for that one.

If that doesn’t work you could try mutating the values in the payload using the Date/Time Node’s “Format” operation.

1 Like

You are right, the last format string:
https://momentjs.com/docs/#/displaying/format/
with the x contains exactly that!

Hmmmm it doesn’t seem to be converting it.

Gotcha single quote missing!