cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
779
Views
5
Helpful
6
Replies

IPCC Express Script Question

justin.allen
Level 1
Level 1

Does anybody know how to do a range of dates. For example, Frome Dec 1 2006 through March first 1007? I am using IPCC Express enchanced 3.5. If you dont know how to do it in 3.5 if you could tell me how to do it in Premium 4.0.4 would work as well.

Thanks

Justin

6 Replies 6

Chris Deren
Hall of Fame
Hall of Fame

This funtionallity is not build into the script editor natively, however you can accomplish that using the Java steps, where you would obtain today's date from the server and then compare it to defined variables which are your day ranges, for example based on the obtained today's date you would store it as string varibale strTodaysDate in following format 20061201, then you would do an if statement such as if strTodaysDate > "20061201" AND strTodaysDate < "20070301" THEN ....

HTH, please rate all posts!

Chris

Dennis Fogler
Cisco Employee
Cisco Employee

Justin,

In IPCC Express 4.0(4) Premium you can use the "java editor" under the "if" step in the script editor. The editor allows you to put together java commands to achieve what you are looking for. For example, I used two if checks and the compared the value of two dates that represented a range to the current date.

if (date1 >= newDate()

True ....

False ...

if (date2 <= newDate()

True...

False ...

This allowed me to check if the current date was between two date ranges. If the current date was outside the range I could send the call to queue. If it was not, I could then play a holiday message.

Thanks, I will give it a try and post the results.

dfogler,

Do you know if I could use this to check a range of dates? Such as Bank Holidays for the next couple of years if i have the list. In your scripting above which one is todays date as stated on the server? Is it possible just to have a = sign instead of greater than and less than? I rated your post much appreciated.

Regards

Chris

cmcinally
Level 1
Level 1

Hi, here you go, this script is provided by Cisco AS-IS in the script repository

(tip: search for script repository at the Cisco site to download all)

http://www.iptnetworkers.com/ipt/forums/forums/thread-view.asp?tid=1777&posts=2

cmcinally
Level 1
Level 1

Here is the attachment