Course Level 2 - error on Date&Time node. (invalid date format)

I am trying to finish level2 course but have some issues.
I am almost sure I did everything good because under the “Date” field in a form of expression I have 9/9/2021 which from what I understand represents expression result. And when I exchange the expression with pure “9/9/2021’ scenario works fine, but when I leave the expression there is an ERROR: Invalid date format”. Anyone knows what I might be doing wrong?

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:

hello @Kamil_Muras

As you have a Loop node with 5 items, the issue may be with one of the items, but not necessarily the first one. Can you show how the JSON view is on the left panel and also click on Details on the right panel? Or set the Loop with 1 item at once, so it will be more clear.

What is your n8n version?

I do not see any errors with that date

I am on 1.29.1

Yes, for some reason it does not accept the date “17/06/2021”.

You can manually specify the format in order that to work again.

@Jon, the Date and Time node somehow gets broken if the date format is dd/MM/yyyy :slight_smile:
(checked in 1.29.1 and 1.31.2)

1 Like

I am sorry but I am still struggling , and none of this make sense for me. Now I get this error, propably because other dates (day and month) do not consist of 2 numbers ? its crazy

it gets even weirder because when I removed one “d” and one “M” , it started to work, but this doesn’t seem to be apriopiate

No, that’s completely fine :slight_smile:

Because your day/month has no padding and can be of one OR two symbols (e.g. 9 or 17), you should use a single d/M format. You can find all format tokens here: luxon - Immutable date wrapper

1 Like

thanks, but it did not work with the example you have provided, which make this little unclear. Anyway I got to the point.

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