Your setValue expression looks right if it comes from a repeat, did you use the picker to select it.
If you date is coming from a database single query step and that step is named myQuery
then the expression should be
{{myQuery.OutDateTime.toTimestamp() - myQuery.InDateTime.toTimestamp()}}
If its coming from a database multi query named myQuery
then the expression should be
{{myQuery[0].OutDateTime.toTimestamp() - myQuery[0].InDateTime.toTimestamp()}}
This would only get the first record though.
If it is coming from a database multi query which has been used as the expression on a repeat step then it would look like
{{OutDateTime.toTimestamp() - InDateTime.toTimestamp()}}
To be very honest this is always a process of elimination and trial and error.
So set your database multi query, then add your repeat with the expression as the query itself, not the bindings inside the query, then add a few test setValue
steps called test1
, test2
etc.
Start small and work your way up.
Make the value {{OutDateTime}}
and test, if it works, then add the toTimestamp()
part to it, if that works, then do more and more and see when it breaks.