Btw, when these expressions become more complex, it can be helpful to use additional variables inside the expressions:
s = dateToMilliseconds( {{Scripter.Customer Call Start Time}} );
d = durationToMilliseconds( {{Scripter.Customer Call Duration}} );
Original Message:
Sent: 08-08-2025 04:11
From: Reginald Sheraton
Subject: Add Number to DNC from Script
thanks for your assistance Christoph, the below did the trick
slice(formatDateISO(dateToMilliseconds({{Scripter.Customer Call Start Time}}) + 0 * 60 * 60 * 1000), 0, 16)+"Z"
------------------------------
Reginald
Original Message:
Sent: 08-08-2025 03:25
From: Christoph Domaschke
Subject: Add Number to DNC from Script
Hi Reginald,
understood. Please have a closer look under formatDateISO(date) and dateToMilliseconds(date) in the documentation. A combination of both should work.
Without having tried this out: formatDateISO(dateToMilliseconds({{Scripter.Customer Call Start Time}}) + 2 * 60 * 60 * 1000) should to the trick.
In case you have a switch between summertime and wintertime you will have to finde a solution for that, too. For my case that was precise enough.
------------------------------
Christoph Domaschke
Leiter Service Center (Cronbank)
Original Message:
Sent: 08-08-2025 03:09
From: Reginald Sheraton
Subject: Add Number to DNC from Script
hi thanks, just need assistance and guidance to get the date format from
08/08/2025 9:07:26 am (+02:00) to yyyy-MM-ddTHH:mmZ
------------------------------
Reginald
Original Message:
Sent: 08-08-2025 02:45
From: Christoph Domaschke
Subject: Add Number to DNC from Script
Hi Reginald,
please have a look in the documentation i linked. There a various options to manipulate the format. (formatDate()-Function)
------------------------------
Christoph Domaschke
Leiter Service Center (Cronbank)
Original Message:
Sent: 08-08-2025 02:40
From: Reginald Sheraton
Subject: Add Number to DNC from Script
Hi Christoph, yes it is to add Expiration date to the DNC List, i look at Script functions and the built in script option, the problem is the format the date is in, DNC List requires the date in this format yyyy-MM-ddTHH:mmZ
------------------------------
Reginald
Original Message:
Sent: 08-08-2025 02:32
From: Christoph Domaschke
Subject: Add Number to DNC from Script
Hi Reginald,
in core your question is about adding dates, correct? Please take a look into this documentation: Additional functions to use in dynamic variables - Genesys Cloud Resource Center under "Date Functions" is erverything you need. For the current date time you can use
{{Scripter.Customer Call Start Time}}
Please note some problems occuring with that:
a) different time zones from the server time. Under some circumstances you will have to add / substract the difference to your timezone. If you are talking about 24 days some hours should make no difference.
b) script language affects time format. If you encounter strange problems with adding times this could be the case.
------------------------------
Christoph Domaschke
Leiter Service Center (Cronbank)
Original Message:
Sent: 08-07-2025 02:20
From: Reginald Sheraton
Subject: Add Number to DNC from Script
Hi all,
i have an outbound campaign, Preview, i have a button on my script to insert a number into a DNC list, this all works fine, but how can i include the ExpirationDateTime into the button to insert? Need to insert number together with current date and time + 24 as ExpirationDateTime. Required format of date and time to insert is - yyyy-MM-ddTHH:mmZ
#Implementation
------------------------------
Reginald
------------------------------