elsenorjose
Technical User
I have a formula which allows me to convert total call time by customer care agent from seconds to hours/minutes/seconds.
numberVar dur := {V_AGENT_CALLS_DAY.ACDTIME};
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);
hhmmss := totext(hrs, "0") + ":" + totext(min, "00") + ":" + totext(sec, "00");
hhmmss
In CR, I am grouping by agent and by day so I get their total ACDTIME by day.
Now, I want to create a summary of their time by date range; i.e.; when a user requests a week of data, I want the agents' daily totals and their weekly total. I have tried creating this formula:
numberVar dur := sum({V_AGENT_CALLS_DAY.ACDTIME});
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);
hhmmss := totext(hrs, "0") + ":" + totext(min, "00") + ":" + totext(sec, "00");
hhmmss
but the result is the sum of ACDTIME across ALL agents for the time period. Has anyone encountered this before and come up with a solution? Thanks in advance. I've used Tek-Tips many times before for KILLER solutions to GNARLY probs so I know I'll find success again!
numberVar dur := {V_AGENT_CALLS_DAY.ACDTIME};
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);
hhmmss := totext(hrs, "0") + ":" + totext(min, "00") + ":" + totext(sec, "00");
hhmmss
In CR, I am grouping by agent and by day so I get their total ACDTIME by day.
Now, I want to create a summary of their time by date range; i.e.; when a user requests a week of data, I want the agents' daily totals and their weekly total. I have tried creating this formula:
numberVar dur := sum({V_AGENT_CALLS_DAY.ACDTIME});
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);
hhmmss := totext(hrs, "0") + ":" + totext(min, "00") + ":" + totext(sec, "00");
hhmmss
but the result is the sum of ACDTIME across ALL agents for the time period. Has anyone encountered this before and come up with a solution? Thanks in advance. I've used Tek-Tips many times before for KILLER solutions to GNARLY probs so I know I'll find success again!