Artur_Dishunts | 2023-06-30 17:34:07 UTC | #1
I found two ways to get current date and time in the script. If we sum "Agent Call Start Time" and "Agent Call Duration" or "Customer Call Start Time" and "Customer Call Duration", then we will current time.
Create dynamic string variable and paste one of the below functions into "Dynamic Value" field.
Using Agent
formatDate(dateToMilliseconds({{Scripter.Agent Call Start Time}}) +durationToMilliseconds({{Scripter.Agent Call Duration}}))
Output:* 06/30/2023 1:27:10 pm (-04:00)
Using Customer
formatDate(dateToMilliseconds({{Scripter.Customer Call Start Time}}) +durationToMilliseconds({{Scripter.Customer Call Duration}}))
Output:* 06/30/2023 1:27:10 pm (-04:00)
If we want to display only MM/DD/YYYY, then add date format using Unicode standard.
formatDate(dateToMilliseconds({{Scripter.Customer Call Start Time}}) +durationToMilliseconds({{Scripter.Customer Call Duration}}), "MM-dd-yyyy")
Output:* 06/30/2023
John_Carnell | 2023-07-03 14:02:24 UTC | #2
Hi Artur,
Thanks for posting and sharing.
system | 2023-08-03 14:03:01 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 20804