Converting a date from 1 format to another

Hi, How would I convert the following date format:

Wednesday, 24 January, 2024

To

yyyy-MM-dd’T’HH:mm:ss.SSSZ

I’ve tried parseDate, but getting a failure

Where Value = Wednesday, 24 January, 2024

According to the Tokens you can use to parse a date variable, you can use dddd, D MMMM, YYYY.

e.g.: {{ parseDate(date; "dddd, D MMMM, YYYY") }}

After parsing the date correctly, only then you can use formatDate

e.g.: {{ formatDate(parseDate(date; "dddd, D MMMM, YYYY"); "DATE-FORMAT") }}

Links

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

General

Help Center Basics

Articles & Videos

3 Likes

parseDate() assumes your input is a text string – make sure that is the case. The output data type of parseDate is a date value which can then be formatted with formatDate() as @samliew described. formatDate() converts the date value back to a formatted string. Just remember this though because if you’re expecting a date input to a subsequent module or within a module you may not need formatDate() since the format you described (ie yyyy-MM-dd’T’HH:mm:ss.SSSZ) is a native ISO date datatype.

4 Likes