# ICM Contact Center Enterprise Month Day Variable

Dec 7th, 2013

I have a date variable and for some reason I am not able to get it working.  I dont think I am being a bone head and missing anything.

I want the call center to route calls to Team A between Oct 1st and Dec 7th ever year (true). Outside those dates calls can go to Team B (false).

Today Saturday December 7th I noticed the calls are routing to Team B.  They should should still be going to Team A till midnight.  Below is my if node statement that does not appear to be working.

Instead of being a true statement it is taking the false route.

In my mind:

If month is greater than or equal to Oct and Day is greater then or equal to the 1st of Oct

OR

If month is less than or equal to Dec and Day is less then or equal to the 7th of Dec

Then you are a true statement

(month()>=month(10)&&day()>=day(1))||(month()<=month(12)&&day()<=day(7))

Where am I going wrong here?

Thanks in advance for any asssitance.

Del

Overall Rating: 0 (0 ratings)

## Replies

david.macias Sun, 12/08/2013 - 20:31
• Blue, 1500 points or more

Maybe something simple, did you check the date/timezone of your central controllers?

david

jpsweeney77 Mon, 03/03/2014 - 17:23
• Bronze, 100 points or more

Hey Del. A few things. First, the evaluation on the date checks are incorrect. For example, to interrogate whether the month is October or greater you would simply query on month()>=10. Same logic structure applies for day. Also, the logic in general is flawed. Your current pseudo code would result in the statement always being true since it will ALWAYS be greater than 10/1 OR less than 12/7. The correct approach would be using an AND condition and even that gets a bit dicey since it's spanning several months so really it would be a combination of both AND and OR's. Just several lines of code that may be overcomplicating things IMO.

I personally would suggest going with the date function but of course it will require the year.

(date()>=date("10/1/2013")&&date()<=date("12/7/2013")

## Trending Topics: Contact Center

 uccx call recording uccx system prompts Cisco cusp Cisco uccx high cpu Cisco uninstall error 28007 Cisco vpn client error 1720 Cisco agent login failed configuration error Cisco jabber login failed