12-29-2006 07:22 AM - edited 03-14-2019 12:24 AM
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
12-29-2006 08:44 AM
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
12-29-2006 09:02 AM
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.
12-29-2006 10:39 AM
Thanks, I will give it a try and post the results.
01-08-2007 03:14 PM
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
01-08-2007 05:36 PM
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
01-08-2007 05:39 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide