Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Gary on January 01, 1970, 12:00:00 AM

Title: Date Comparison in IR Strategy
Post by: Gary on January 01, 1970, 12:00:00 AM
Hello, does anyone have a method to clculate the difference, in days from a retrieved date and the current system date provided by the date[] function in a strategy.

The idea is to flag records that have an activation date >= 75 days. It looks to be a tedious proccess without the use of a custom server.

Are there any folks that have used a DB dip to run a stored procedure out on ORCL? Anyway, any insight is greatly appreciated.
Title: Date Comparison in IR Strategy
Post by: Pretty Girl on January 01, 1970, 12:00:00 AM
We are using Oracle stored procedure with URS, which among other things calculates the number of hours between the last and the current call.
Do you have trouble getting the results? Can you please tell me how I can help you!
Cheers!
Title: Date Comparison in IR Strategy
Post by: Gary on January 01, 1970, 12:00:00 AM
THank you for the response. The goal is to implement the logic inside the strategy so as to limit the any calls to outside applications (customer servers or ORCL). The plan is to use the statistical tables configurable in CME. In the tables there will be 13 indices. For each month index there will be a value cooresponding to the number of days left in that year and the 13th indice will be a constant(1980) used to calculate if the current year is a leap year.

There will be a lot of stuff in the subroutine/strategy but the thinking is that since the logic is loaded in memory performance will be good.

Thank you again for the feedback.
Gary
Title: Date Comparison in IR Strategy
Post by: Pretty Girl on January 01, 1970, 12:00:00 AM
Hello, Gary!
Do you need explanation of how to call Oracle procedure from URS and retrieve the results or did you get it already from other board members?
Title: Date Comparison in IR Strategy
Post by: Tony Tillyer on January 01, 1970, 12:00:00 AM
Perhaps a date condition, along the lines of:

CASE WHEN (Date in yymmdd format) = CONVERT (char,GETDATE()75,12) THEN 1 ELSE 0 END

In this instance, enter *1* as the condition, which will return today's date minus 75 days.

Not sure if this is what you are after, but it works in Brio/VB (which really isn't saying much!)

I hope this helps?

Tony
Title: Date Comparison in IR Strategy
Post by: VIC on January 01, 1970, 12:00:00 AM
Hi, Tony,

that does not look like a stored procedure! :)
Title: Date Comparison in IR Strategy
Post by: Tony Tillyer on January 01, 1970, 12:00:00 AM
Hi Vic,

It's one I made up as I went along...! :)

Anything to help...