# Wrong formatDate

**URL:** <https://community.make.com/t/wrong-formatdate/16354>\
**Category:** Questions\
**Tags:** format-date, date-time-functions\
**Created:** [September 22, 2023, 2:27am UTC](https://community.make.com/t/wrong-formatdate/16354 "2023-09-22T02:27:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrendanC](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@BrendanC](https://community.make.com/u/BrendanC)\
**Post date:** [September 22, 2023, 2:27am UTC](https://community.make.com/t/wrong-formatdate/16354/1 "2023-09-22T02:27:03Z")

</div>

I have a scenario for Snapforms pushing date to [Monday.com](http://Monday.com).

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/d/df84f34d9c00e5059e935e967abf7c14ceee84c3.png)

Note the above screenshot of Snapforms’ TerminationDate passing on as 02/10/2023 (DD/MM/YYYY)

But on [Monday.com](http://Monday.com), it gives out 2023-02-10 (YYYY-MM-DD). It got the day and month wrong.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/6/647be9bd41db3a5fdcee50f4a9bc60af0ddb9230.png)

Below is the module inspector for the formatDate function.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/3/314562d3a19d6f37664b81547b10ae432df5fb85.png)

What could’ve caused the issue above?

Could the String format of TerminationDate from Snapforms be causing the confusion here?

![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/e/e50a609de34e18359dddcb03824305b0bc0376bd.png)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [September 22, 2023, 2:32am UTC](https://community.make.com/t/wrong-formatdate/16354/2 "2023-09-22T02:32:28Z")

</div>

Welcome to the Make community!

The type of the “Item 2”-Value-Date field is of a **Date** variable type.

Using the built-in function `formatDate()` always returns a **String** variable type .

What you want is actually `parseDate()` so that a Date variable is mapped into that field, instead of a String variable:

```plaintext
{{ parseDate(1.TerminationDate; DD/MM/YYYY) }}

```

For more information on `parseDate()`, refer to the help center [https://www.make.com/en/help/functions/date---time-functions#parsedate--text--format---timezone--](https://www.make.com/en/help/functions/date---time-functions#parsedate--text--format---timezone--)

---

<div class="post-metadata">

**Author:** ![BrendanC](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@BrendanC](https://community.make.com/u/BrendanC)\
**Post date:** [September 22, 2023, 2:52am UTC](https://community.make.com/t/wrong-formatdate/16354/3 "2023-09-22T02:52:14Z")

</div>

Hi Sam,

Thanks for your quick reply. I’ve changed the syntax and this is what I’m getting now for passing 02/10/2023 (DD/MM/YYYY). [Monday.com](http://Monday.com) has also mentioned the date format their system support is only YYYY-MM-DD.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/0/0cbd17dce8fdcd929870e330a357b4233cd3579b.png)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [September 22, 2023, 3:33am UTC](https://community.make.com/t/wrong-formatdate/16354/4 "2023-09-22T03:33:35Z")

</div>

In that case, then you can `formatDate` after `parseDate`:

```plaintext
{{ formatDate(parseDate(1.TerminationDate; DD/MM/YYYY); YYYY-MM-DD) }}

```

By parsing the string into a **Date** type first, you can convert a string representation of a date into another date format.

---

<div class="post-metadata">

**Author:** ![BrendanC](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@BrendanC](https://community.make.com/u/BrendanC)\
**Post date:** [September 22, 2023, 4:07am UTC](https://community.make.com/t/wrong-formatdate/16354/5 "2023-09-22T04:07:06Z")

</div>

You’re a legend! Cheers mate!

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [October 6, 2023, 4:07am UTC](https://community.make.com/t/wrong-formatdate/16354/6 "2023-10-06T04:07:17Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


