Date Formatting of Magic Text in Email

Hi there, I’m using the Custom Action function to trigger an email send when a user clicks a button, using SendInBlue API.

It’s working perfectly, but I have a Date and Time data point that doesn’t get formatted properly. I think this could be fixed with a JSON converting string or something, but I have zero knowledge in JSON.

Here’s what I’m talking about:


Appreciate any help, thanks in advance!

Hi Vance,

This topic will give you more insight in to what is happening here: Help : StarTIME +60 = funny Endtime 🤔 - #3 by karimoo

Hey Colin, thanks for that. But not sure if I’m missing something, I can’t really tell how that would change that value into a proper date and time format in the email…

I’m thinking if there’s any JSON code I can add in the script to convert that number or convert something like 2020-08-20T11:15:00.000Z into a more friendly date and time format.

Thanks!

You might have to ask SendInBlue what they can do here. I’m not sure what time/date format they are expecting to receive.

Hey Collin, I changed the field type to text, and I got 2020-08-20T11:15:00.000Z.

I believe there’s a way to use JSON code to convert 2020-08-20T11:15:00.000Z to something like

20 Aug 2020 11:15

I’ve been looking around but I can’t seem to figure out because I have no knowledge in JSON :joy: not sure if you can help out if you do know.

Thanks!

I do not think this can be done in JSON. The body you are sending may be a JSON file but the text within that is what matters and that is being sent as plain text.

I will ask the team what can be done here but my guess is we need to be able to support changing the date format within these magic text items in custom actions like you can normally do with a normal text value such as the image below:

1 Like

Yes, that’s right. The issue is the magic text items in custom actions don’t allow us to specify the date format.

Do you know any possible workarounds in the meantime?

The best I can think of is a very manual way, which is to create another text field in that data collection and manually key in the date in a format we would like.

Thanks so much for your help!

One way would be to use integromat for the custom action. Send the data via webhook and within integromat you can use the parseDate function to turn the Adalo date string in to a valid date.

Formula for integromat would be:

parseDate(adalodate,MM-DD-YYY)

Where “adalodate” is the text string sent by Adalo.

Hey Colin, thanks for the help! We’ve gone ahead to manually key in the date for now :joy:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.