Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

D.[Now] format default to Month/Day/Year But my Holiday.xml is in Day/Month/Year Format

Hi All

Need a Little Help

 

Can anyone assist with my issue.

I have a Contact centre scripts with "Date"  Variables which are as follows: tCurrent_date & tHoliday_Date, the variables are Concatenated into a 

String Varible New Date = sHoliday_Returned_Date.

 

If I run a debug on the script the Date Time format is Month/Day/Year, However my Holiday file is Day/Month/Year.

If I change the Holiday file to suit i.e Month/Day/Year, there is no Problem, However I would like the returned Date value to be Day/Month/year.

without totally blowing up my script is there an easy way to convert the Returned value so its' in the format day/Month/Year.

My Script is attached

 

Thanks

 

Charles

 

Dates Variables

tCurrent_Date

tHoliday_Date

 

UCCX Current date equals:

SET = tCurrent_Date

Value: D[now]

& My Return

UCCX Retruned tHoliday_Date (into UCCX Memory)

 

tHoliday_Date

value: new Date(sHoliday_Returned_Date)

Boolean Value compares tCurrent_date & tHoliday_Date

(((tCurrent_Date.date == tHoliday_Date.date) && (tCurrent_Date.month == tHoliday_Date.month) && (tCurrent_Date.year == tHoliday_Date.year)))

 

5 REPLIES

What leve license is your

What level license is your UCCX: standard, enhanced, premium?

New Member

The UCCX is a premium license

The UCCX is a premium license.

 

 

Charles

 

If you must have your Date

If you must have your Date format remain as you have it..use the Java SimpleDateFormat Class:

Define the String you are going to use to compare with Dates in your XML File (where ddMMyyyy is that String in the Below Set Step)

Set ddMMyyyy = {

String format = "dd/MM/yyyy";

java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat( format );

Date d = D[now];

return sdf.format( d );

}

New Member

Hi Sam, Thanks for the quick

Hi Sam,

 

Thanks for the quick response is it really that simple? I assume I assume I insert the following script logic before the Set = tCurrent_Date within the script logic?

 

 

regards

 

 

 

Charles

 

 

I don't know about your

I don't know about your script; I don't have a way to look at it currently..The "Set" Step I defined here returns a String with the Format You Need..in order to compare with the Values that are returned from your XML Document.

566
Views
0
Helpful
5
Replies
CreatePlease login to create content