# Date and time node : invalid date format

**URL:** <https://community.n8n.io/t/date-and-time-node-invalid-date-format/33299>\
**Category:** Questions\
**Tags:** core, node, date-time\
**Created:** [November 22, 2023, 9:04pm UTC](https://community.n8n.io/t/date-and-time-node-invalid-date-format/33299 "2023-11-22T21:04:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thibault](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thibault/32/23467_2.png) [@Thibault](https://community.n8n.io/u/Thibault)\
**Post date:** [November 22, 2023, 9:04pm UTC](https://community.n8n.io/t/date-and-time-node-invalid-date-format/33299/1 "2023-11-22T21:04:11Z")

</div>

Hello  
I am trying to schedule to send an email to my customers 11 month after they opt in to our newsletter.  
I have a field “received-at-date” for the submission date  
My plan is to add 11 months to this date and to send an email at this new date

here is my workflow

last node ouput : ERROR: Invalid date format  
NodeOperationError: Invalid date format  
at Object.parseDate (/app/code/node\_modules/n8n-nodes-base/nodes/DateTime/V2/GenericFunctions.ts:46:10)  
at Object.execute (/app/code/node\_modules/n8n-nodes-base/nodes/DateTime/V2/DateTimeV2.node.ts:119:33)  
at Workflow.runNode (/app/code/node\_modules/n8n-workflow/src/Workflow.ts:1307:31)  
at /app/code/node\_modules/n8n-core/src/WorkflowExecute.ts:1048:44  
at processTicksAndRejections (node:internal/process/task\_queues:95:5)

I tried to set my date whith this same node to DD/MM/YYYY  
but no succes  
I am running the last stable version of n8n : 1.15.2

Thanks for your help, n8n is so greaaaat !!

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [November 22, 2023, 9:04pm UTC](https://community.n8n.io/t/date-and-time-node-invalid-date-format/33299/2 "2023-11-22T21:04:13Z")

</div>

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:**

---

<div class="post-metadata">

**Author:** ![mellesc](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mellesc/32/30193_2.png) [@mellesc](https://community.n8n.io/u/mellesc)\
**Post date:** [November 23, 2023, 9:19am UTC](https://community.n8n.io/t/date-and-time-node-invalid-date-format/33299/3 "2023-11-23T09:19:37Z")

</div>

You might want to use DateTime.fromISO() or DateTime.fromFormat() depending on the format you receive from the previous node.

something like

`{{ DateTime.fromFormat($json.received_at_date, "yyyy-MM-dd") }}`

Edit:  
you could also add the delta right there  
`{{ DateTime.fromFormat($json.received_at_date, "yyyy-MM-dd").plus(11, "months") }}`

> **[luxon 3.4.4 | Documentation](https://moment.github.io/luxon/api-docs/index.html#datetime)**
>
> Immutable date wrapper

---

<div class="post-metadata">

**Author:** ![Thibault](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thibault/32/23467_2.png) [@Thibault](https://community.n8n.io/u/Thibault)\
**Post date:** [November 23, 2023, 11:01am UTC](https://community.n8n.io/t/date-and-time-node-invalid-date-format/33299/4 "2023-11-23T11:01:45Z")

</div>

Yes thank you !!  
Your solution works great, but I also found I should change my timezone to Paris in the workflow settings.  
Thanks for your quick reply,  
Greetings from France

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [February 21, 2024, 11:02am UTC](https://community.n8n.io/t/date-and-time-node-invalid-date-format/33299/5 "2024-02-21T11:02:36Z")

</div>

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