11-17-2017 07:42 AM - edited 03-14-2019 05:44 PM
I'm working on a change to one of my call center scripts that will 1st check to see if the date matches a list of holidays (holiday.xlm) then look at the time of day. If the TOD is a match then the statement would be true otherwise it would be false. I have the holiday date check already working, it looks at the xml file and if it finds a match then sets a flag to true, other wise its false. My problem is when the flag is true I need to match the date to a time of day before saying its true. Each of the dates has different times they want it to be true.
Hope this makes since, if not please ask so I can try and clairify.
Solved! Go to Solution.
11-21-2017 09:58 AM
If this schedule only applies to these dates and hours, then try this...
Add the following variable;
sTodaysDate [String] = ""
Within your script, add the following steps;
Set sTodaysDate = D[now].month + "/" + D[now].dom
Followed by;
Switch String ( sTodaysDate )
Within the Switch statement, add the following values;
"11/23"
"11/24"
*Make sure you include the " " as well.
Under the Connections column, type whatever name you want to help you identify this branch... for example, the connection for "11/23" might be Nov23.
Under each branch of the Switch statement, you can insert the Time of Day step and determine the hours of operation.
If you want, you can declare the D[now].year as well. That way, if you forget to remove these steps... you won't have to worry about these rogue steps implementing on the same date/time next year.
11-17-2017 08:17 AM
More information to attempt to clarify what I am asking. Here are a couple of the dates and times:
11/23/17 from 5pm to 12am
11/24/17 from 12am to 6am
12/24/17 9pm to 12am
I think you get the idea, is there a way to write it in IF statement that if the date_strg = D(Now) and TOD = 5pm - 11:59pm the entire if statement is true.
With this in mind I'm guessing I would need to have multiple IF statements back to back.
11-21-2017 09:58 AM
If this schedule only applies to these dates and hours, then try this...
Add the following variable;
sTodaysDate [String] = ""
Within your script, add the following steps;
Set sTodaysDate = D[now].month + "/" + D[now].dom
Followed by;
Switch String ( sTodaysDate )
Within the Switch statement, add the following values;
"11/23"
"11/24"
*Make sure you include the " " as well.
Under the Connections column, type whatever name you want to help you identify this branch... for example, the connection for "11/23" might be Nov23.
Under each branch of the Switch statement, you can insert the Time of Day step and determine the hours of operation.
If you want, you can declare the D[now].year as well. That way, if you forget to remove these steps... you won't have to worry about these rogue steps implementing on the same date/time next year.
11-22-2017 06:27 AM
your answer is the exact thing I ended up doing before you posted it. It was easy to write and just a simple to implement.
Thanks for your assistance.
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