Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating Turnaround Times

Status
Not open for further replies.

Rosy1

Technical User
Aug 6, 2003
19
0
0
US
I have written a repot that is looking at turnaround times. I wrote a formula to calculate the TAT and it works.

datetimevar CDT:={URTJ_CBPhoneResult_View.CallbackDateODBC}+{URTJ_CBPhoneResult_View.CallbackTimeODBC};
datetimevar PDT:={URTJ_CBPhoneResult_View.PhoneDateODBC}+{URTJ_CBPhoneResult_View.PhoneTimeODBC};
numbervar callphone:=datediff("n",CDT,PDT);
if callphone <=30 then "<30m" else
if callphone >30 then
if callphone <=60 then totext(callphone,0,"") & "m"
else totext(int(callphone/60),0,"") & "h" & " " & totext(remainder(callphone,60),0,"") & "m"

The first report has two columns one for the <30 mins and the other for >30mins which displays the actual time. I want to break this down further and display the entries from 31-45 mins and from 46-60. So far I have not been able to get this to work. So I think it may be in the above formula. Any thoughts or suggestions?

Thanks... Rosy1
 
Try:

datetimevar CDT:={URTJ_CBPhoneResult_View.CallbackDateODBC}+{URTJ_CBPhoneResult_View.CallbackTimeODBC};
datetimevar PDT:={URTJ_CBPhoneResult_View.PhoneDateODBC}+{URTJ_CBPhoneResult_View.PhoneTimeODBC};
numbervar callphone:=datediff("n",CDT,PDT);
if callphone <=30 then "<30m" else
if callphone >30 and
callphone <= 45 then "31 to 45m" else
if callphone > 45 and
callphone <= 60 then "46 to 60m" else
if callphone > 60 then ">60m"

In order to group them in intervals, you have to use the intervals in the formula. If you insert a group on this formula, you can then display the actual calculation in the detail section.

Similarly, you could use the above formula as a column in a crosstab, and then if you add the call ID as a row field, you can use the actual datediff as a summary field in order to display all actual times in the appropriate column. You would use the datediff formula with minutes as results and then format the result in preview mode by going to format field->common->display string->x+2 and writing a formula like:

totext(int(currentfieldvalue/60),0,"")+"h "+totext(remainder(currentfieldvalue,60),0,"")+"m"

This works in 11.0.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top