cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1005
Views
0
Helpful
3
Replies

UCCX scripting question

LouisCanick2034
Level 1
Level 1

Trying to Set Enterprise Call Info to populate Call Peripheral Variable with Date and Time call is placed in queue. This for use in Finesse using 2Ring gadgets. Can't figure a way to combine Date and Time in the Expression editor so we can populate a single variable that will be sent with the call in the queue when presented to the agent ... 

 

Using D[now] or T[now] will give Date or Time, but not both. No syntax we have tried seems to be acceptable and the Help info is  not helpful. 

 

Ideas??

 

Thanks..

Lou

 

3 Replies 3

With D[now] you should get both time and date.
image.png

Why do you want to combine D[now] and T[now]?

To your question. I think that the outcome of the commands results in different types of variables, so you'd likely need to save them individually in sting variables and then combine them, Although I'm by far no expert on the expression language used in CCX.



Response Signature


You don’t need to combine Date and Time variables. Date object contains date and time.

If you need to convert Date object to String using the specific date format, use the following code (in Set step):

 

{

java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm");

df.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));

return df.format(D[now]);

}

 

As the result you will receive the string with properly formatted Date object.

 

For more details regarding the date formats look at https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html 

Thanks... I found the solution to the original question.