How can I set the datepicker output to timestamp with declarative style

Describe the issue/error/question

I’m using declarative style to crate my custom node and I need to send date picker output as timestamp. How can I change it’s format?

Can I add some JS code inside {{ }} somewhere?

Information on your n8n setup

  • n8n version: 0.209.3

Perhaps @marcus can help with this one?

Hi @rostamiani,
in a declarative node you could do something like this

The default value of routing.send.value is ={{$value}} which would set the raw date ISO string. If you override routing.send.value to ={{ new Date($value).getTime() }} you can use javascript inside {{ }} to get the timestamp value from you date string.


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