parseDate won't accept format token other than X if given unix time

  • use parseDate() to convert a unix time in milliseconds to 2024-07-01T19:00:00.000Z format
  • I understand parseDate() uses seconds as input, so I already divided my input by 1000
  • It works if I just do parseDate(1719860400 ; X)
  • I don’t understand why I keep getting “The operation failed with an error. Failed to map ‘value’: Function ‘parseDate’ finished with error! ‘1719860400’ is not a valid date or does not match the date format.”

yes this is correct.

then, you need to wrap it with formatDate with the format you want to transform the date into.

so something like this:

{{ formatDate(parseDate(1719860400; "X"); "YYYY-MM-DD") }}

For more information, see Parse and Format date tokens below:

Here are some useful links and guides to help you get started and learn more on how to use the Make platform, apps, and app modules —

General

Help Center Basics

Articles & Videos

samliewrequest private consultation

Join the unofficial Make Discord server to chat with us!

3 Likes

Thank you @samliew !!

{{formatDate(parseDate(1719860400000; "x"); "YYYY-MM-DDTHH:mm:ss.SSS"; "Zulu")}}Z

Produces the format I needed. The x token allows for milliseconds.

2 Likes