I have a report that am calculating the turnaround times. using the formula below I get the number of minutes I need for the report. However when the turnaround time is greater than 1 hour, instead of adding the 60 minutes from the hour to the remaining minutes, the 1hr is converted to 100 then the minutes are added. My turnaround time of 1hr 43 minutes became 143 minutes. Any suggestions on how to fix this.
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 totext(callphone,0,"") else
if callphone >30 then
if callphone <=60 then totext(callphone,0,"")
else totext(int(callphone/60),0,"") & totext(remainder(callphone,60),0,"")
My second problem is once I have calculated the time I need to create two columns one that has all data <30 minutes and the other with all data >30 minutes. I wrote an "if then" statement and it works, but when I try to calculate the average it is using all of the values that returned a "0" from the "If then" statement and making my average turnaround time look very good, but not accurate. Any suggestions on this one?
Thanks... Rosy
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 totext(callphone,0,"") else
if callphone >30 then
if callphone <=60 then totext(callphone,0,"")
else totext(int(callphone/60),0,"") & totext(remainder(callphone,60),0,"")
My second problem is once I have calculated the time I need to create two columns one that has all data <30 minutes and the other with all data >30 minutes. I wrote an "if then" statement and it works, but when I try to calculate the average it is using all of the values that returned a "0" from the "If then" statement and making my average turnaround time look very good, but not accurate. Any suggestions on this one?
Thanks... Rosy