This topic was automatically generated from Slack. You can find the original thread here.
Hey everyone,
I’m looking to do some javascript date conversion using the props data provided in a workflow step.
the step value is something like
timestamp:2023-06-02T17:51:02.864Z
and the output used for another step would convert it to “6/2/2023 5:51:02 PM”
I would normally put a javascript conversion within the {{steps.trigger.event.timestamp}} , but it looks like it would require a “new Date()“, which doesn’t seem to work within {{ }}
{{ new Date(steps.trigger.event.timestamp.toLocaleString().replace(“,”,“”) }}
Is there another way to do this with new ? I could write a nodejs step, but wanted to see if it can be done inline