# Date Format String

**URL:** <https://community.n8n.io/t/date-format-string/45866>\
**Category:** Questions\
**Tags:** data-transformation, transform-date\
**Created:** [May 11, 2024, 12:22am UTC](https://community.n8n.io/t/date-format-string/45866 "2024-05-11T00:22:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jackon\_Spray](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jackon_spray/32/39195_2.png) [@Jackon\_Spray](https://community.n8n.io/u/Jackon_Spray)\
**Post date:** [May 11, 2024, 12:22am UTC](https://community.n8n.io/t/date-format-string/45866/1 "2024-05-11T00:22:50Z")

</div>

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”.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/7/8/78f60878527fb54a3ecd48adef115d8a3efe852f.png)

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

---

<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:** [May 11, 2024, 12:22am UTC](https://community.n8n.io/t/date-format-string/45866/2 "2024-05-11T00:22:51Z")

</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:** ![ihortom](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ihortom/32/11473_2.png) [@ihortom](https://community.n8n.io/u/ihortom)\
**Post date:** [May 11, 2024, 1:42am UTC](https://community.n8n.io/t/date-format-string/45866/3 "2024-05-11T01:42:11Z")

</div>

@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`.

---

<div class="post-metadata">

**Author:** ![Jackon\_Spray](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jackon_spray/32/39195_2.png) [@Jackon\_Spray](https://community.n8n.io/u/Jackon_Spray)\
**Post date:** [May 11, 2024, 3:24am UTC](https://community.n8n.io/t/date-format-string/45866/4 "2024-05-11T03:24:26Z")

</div>

> [@ihortom](#):
>
> `{{ DateTime.fromFormat($json.date, 'd LLLL y').toFormat('yyyy-MM-dd') }}`.

it works thank you

---

<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:** [May 18, 2024, 3:25am UTC](https://community.n8n.io/t/date-format-string/45866/5 "2024-05-18T03:25:14Z")

</div>

Closed on May 18, 2024, 3:25am UTC

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