Thank you Robert, but only "datetimediff" expression exist either in update data string or duration.
I don't think it exist only "datediff", I didn't found it in docs also.
So if "datetimediff" works, I need to convert the
milliseconds to seconds > minutes > hours and then days.
------------------------------
Mostafa Oudderhem
SABIO FRANCE SAS
------------------------------
Original Message:
Sent: 11-11-2022 11:10
From: Robert Wakefield-Carl
Subject: Calculate the difference between two dates in Architect
That should be in there. Could be the type of expression you have. Check using Update Data with a string or duration. DateTimeDiff will return a datetime duration, which in Genesys Cloud is usually milliseconds.
------------------------------
Robert Wakefield-Carl
Avtex Solutions, LLC
Contact Center Innovation Architect
https://www.Avtex.com
https://RobertWC.Blogspot.com
Original Message:
Sent: 11-11-2022 11:00
From: Mostafa Oudderhem
Subject: Calculate the difference between two dates in Architect
Hi Robert,
Many thanks for your reply, however, I find only "DateTimeDiff" in Architect expressions, I cannot find "DateDiff".
Does the "DateTimeDiff" expression return "days" or "hours" ?
Thank you.
------------------------------
Mostafa Oudderhem
SABIO FRANCE SAS
Original Message:
Sent: 11-11-2022 10:52
From: Robert Wakefield-Carl
Subject: Calculate the difference between two dates in Architect
There are Diff functions in the expression editor for this:
You will need to make sure your two times ($NOW) and your time are in DateTime format or use MakeDate for that. Then use the DateDiff to get the difference in days. Never tried large differences like months or years, but should still return the number of days.
------------------------------
Robert Wakefield-Carl
Avtex Solutions, LLC
Contact Center Innovation Architect
https://www.Avtex.com
https://RobertWC.Blogspot.com
Original Message:
Sent: 11-11-2022 10:34
From: Mostafa Oudderhem
Subject: Calculate the difference between two dates in Architect
Hi,
I need the expression to calculate the difference between the "current_date" and another date returned by an external Web Service (with format: yyyy-mm-dd) in order to obtain the number of days as difference in Architect.
Thank you in advance for you help.
Regards.
#Routing(ACD/IVR)
#SystemAdministration