Date Format String

Hello All,
I have a problem about the date format and I want to change the date format.
How to change the date format from “10 may 2024” to “2024-05-10”.

Information on your n8n setup

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

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:

@Jackon_Spray , use the expression {{ DateTime.fromFormat($json.date, 'd LLLL y').toFormat('yyyy-MM-dd') }}.

I assume the month is the full name, that is “april” and not “apr”. If the three-latter month is used then replace LLLL with LLL.

1 Like

it works thank you

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