Date converted to Unix number - minimum 13 characters

Hi,

I have converted todays date to unix using the Format a Date (format Unix TimeStamp). The output is correct 1716688647, however I need it in 13 digits (1716688647000). Im not sure on the best way to achieve this? Is it best to use JS function? or is there something else that is far more suitable?

N8N Version: Version 1.42.1

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@David_Busuttil ,

{{ DateTime.fromISO($today).toMillis() }}
1 Like

Actually if the $today is 10chars-long timestamp, then better to use {{ DateTime.fromSeconds($today).toMillis() }} :slight_smile:

Or even {{ $today*1000 }} (depending on what you need to do with it)

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