Dynamics variable in script

Hello, I'm trying to format variable values in a specific format:

In a script, I have my variable Sortant.CHAMPS_LIBRES_1 in the format string DD/MM/YYYY, and my variable Sortant.CHAMPS_LIBRES_2 in the format string HH:MM. I would like to have the following result in the variable RDV_FINAL: YYYY-MM-DDTHH:MM:SS+0200.

I tried this, but it doesn't work:

format(date({{Sortant.CHAMPS_LIBRES_1}}, 'DD/MM/YYYY'), 'YYYY-MM-DDTHH:mm:ssZ') + {{Sortant.CHAMPS_LIBRES_2}}

Do you have any idea how to do this? Thank you.

  1. First of all, make it one string so it includes date and time.
  2. Then you have to convert that string to milliseconds using dateToMilliseconds({{your_var}}) function.
  3. Finally convert this to ISO format (I think this is the one you described) using formatDateISO() function.

formatDateISO(dateToMilliseconds({{date}}+{{time}}))

For more information use the link below:

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