Storing a time stamp in an embedded workflow

Hi there,
I’m trying to store dates and times and perform some date difference calculations in an embedded workflow.
What is the best way to do this?
I have looked a bit into the rust function node but that’s new to me and I’m not sure if I need to and how I can install rust packages for dates manipulation.
Any tips on this would be appreciated :slight_smile:
Cheers
Jules

You could use the Storage: Set Value and Storage: Get Value Nodes to handle the storing and retrieving of the values.

As for difference calculations - what format are the dates/times in? If they are Unix timestamps, you should be able to use a Math Node to calculate the difference between two values in seconds or milliseconds, depending on the input format.

If they are in a different format, then you’ll probably have to use a Rust Function Node since embedded workflows do not support the Handlebars helpers needed to convert other date formats into Unix timestamps. You could do the conversion in that node and then do the calculation in a Math Node, or if you’d prefer, do the calculation also in the Rust Function Node.