# Not able to format this date

**URL:** <https://community.make.com/t/not-able-to-format-this-date/5266>\
**Category:** Questions\
**Created:** [November 29, 2022, 5:08pm UTC](https://community.make.com/t/not-able-to-format-this-date/5266 "2022-11-29T17:08:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fahad\_Sheji](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@Fahad\_Sheji](https://community.make.com/u/Fahad_Sheji)\
**Post date:** [November 29, 2022, 5:08pm UTC](https://community.make.com/t/not-able-to-format-this-date/5266/1 "2022-11-29T17:08:53Z")

</div>

Hey guys, I am trying to format a date and I am getting an error saying its not a proper date or something

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/5/5f611030790c35aa311387d505d2ccef24eb01ce.png)  
This is the function I used

```auto
formatdate ( `November 29th, 7:40am`; M/D/YYYY h:mma ; America/New_York)

```

Why am I getting error messages here with this formula

---

<div class="post-metadata">

**Author:** ![makeitfuture](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/makeitfuture/32/6050_2.png) [@makeitfuture](https://community.make.com/u/makeitfuture)\
**Post date:** [November 29, 2022, 7:36pm UTC](https://community.make.com/t/not-able-to-format-this-date/5266/2 "2022-11-29T19:36:17Z")

</div>

Hi @Fahad_Sheji The formatDate function expects a variable of type text. What you are providing there is a string.  
You would have to use parseDate function to first transform the string into date, than use format date.

---

<div class="post-metadata">

**Author:** ![NolaDigital](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/noladigital/32/226_2.png) [@NolaDigital](https://community.make.com/u/NolaDigital)\
**Post date:** [November 29, 2022, 9:07pm UTC](https://community.make.com/t/not-able-to-format-this-date/5266/3 "2022-11-29T21:07:02Z")

</div>

To complement Tiberiu’s answer. You can always see the type of the variable from another module when you hover over it:

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

If it’s a text, we need to Parse it first. And then we can reformat it.

This should work:

```auto

{{formatDate(parseDate(`November 29th, 7:40am`; "MMM Do, HH:mm a"; "America/New_York"); "M/D/YYYY h:mma "; "America/New_York")}}

```

---

<div class="post-metadata">

**Author:** ![R-SimplifiedWebhooks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/r-simplifiedwebhooks/32/3914_2.png) [@R-SimplifiedWebhooks](https://community.make.com/u/R-SimplifiedWebhooks)\
**Post date:** [November 30, 2022, 8:59am UTC](https://community.make.com/t/not-able-to-format-this-date/5266/4 "2022-11-30T08:59:20Z")

</div>

wow, @makeitfuture & @NolaDigital I was always doing this through trial & error 😃 I didn’t know I can find out this way! Thank you 🙏

---

<div class="post-metadata">

**Author:** ![Fahad\_Sheji](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@Fahad\_Sheji](https://community.make.com/u/Fahad_Sheji)\
**Post date:** [November 30, 2022, 6:17pm UTC](https://community.make.com/t/not-able-to-format-this-date/5266/5 "2022-11-30T18:17:28Z")

</div>

Thanks, btw I would like to know what does adding the time zone at the end do.

Are we telling the system that “format the date in this way and make it into this time zone’s time” or are we telling them that “format the date in this way and this is the time zone of the input date”

---

<div class="post-metadata">

**Author:** ![makeitfuture](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/makeitfuture/32/6050_2.png) [@makeitfuture](https://community.make.com/u/makeitfuture)\
**Post date:** [November 30, 2022, 6:20pm UTC](https://community.make.com/t/not-able-to-format-this-date/5266/6 "2022-11-30T18:20:47Z")

</div>

the time zone option will return the date in the time zone you define. The input time zone is defined by your account settings.

---

<div class="post-metadata">

**Author:** ![Fahad\_Sheji](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@Fahad\_Sheji](https://community.make.com/u/Fahad_Sheji)\
**Post date:** [November 30, 2022, 6:26pm UTC](https://community.make.com/t/not-able-to-format-this-date/5266/7 "2022-11-30T18:26:52Z")

</div>

What if the input time varies based on the time zone of the lead, how can I tell MAKE that this is their time zone and I want them in this format.

PS: I have this problem with an automation regarding calendly where I am supposed to add the date and time slot they booked into a sheet but this date depends on which time zone they set in calendly.

---

<div class="post-metadata">

**Author:** ![makeitfuture](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/makeitfuture/32/6050_2.png) [@makeitfuture](https://community.make.com/u/makeitfuture)\
**Post date:** [December 1, 2022, 6:16am UTC](https://community.make.com/t/not-able-to-format-this-date/5266/8 "2022-12-01T06:16:49Z")

</div>

I would set a variable and do some testing until the result matches the expectations. If the time zone need to be dynamic based on some calendly input use a switch function or module.

---

<div class="post-metadata">

**Author:** ![Fahad\_Sheji](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@Fahad\_Sheji](https://community.make.com/u/Fahad_Sheji)\
**Post date:** [December 3, 2022, 7:25am UTC](https://community.make.com/t/not-able-to-format-this-date/5266/9 "2022-12-03T07:25:26Z")

</div>

> [@makeitfuture](#):
>
> ld set a variable and do some testing until the result matches the expectations. If the time zone need to be dynamic based on some calendly input use a switch function

how should I use the switch function for this instance

---

<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:** [September 7, 2023, 3:08pm UTC](https://community.make.com/t/not-able-to-format-this-date/5266/10 "2023-09-07T15:08:44Z")

</div>

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


