I have a scenario for Snapforms pushing date to Monday.com .
Note the above screenshot of Snapforms’ TerminationDate passing on as 02/10/2023 (DD/MM/YYYY)
But on Monday.com , it gives out 2023-02-10 (YYYY-MM-DD). It got the day and month wrong.
Below is the module inspector for the formatDate function.
What could’ve caused the issue above?
Could the String format of TerminationDate from Snapforms be causing the confusion here?
samliew
September 22, 2023, 2:32am
2
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:
{{ 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--
2 Likes
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 has also mentioned the date format their system support is only YYYY-MM-DD.
samliew
September 22, 2023, 3:33am
4
In that case, then you can formatDate
after parseDate
:
{{ 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.
1 Like
You’re a legend! Cheers mate!