williadn48
Programmer
I am a real new newbie to CR. I want to make sure this is an accurate formula.
START....
numberVar vol;
numberVar secs;
numberVar productivity;
vol := Sum ({sp_get_Operator_Stats_ByDate_More_Than_One;1.Imgv_Imgs}, {sp_get_Operator_Stats_ByDate_More_Than_One;1.operatorid});
secs := Sum ({sp_get_Operator_Stats_ByDate_More_Than_One;1.Imgv_Secs}, {sp_get_Operator_Stats_ByDate_More_Than_One;1.operatorid});
if secs <> 0 and vol <> 0 then
productivity := vol/((secs/60)/60)
else
productivity := 0;
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs := Truncate(Truncate(productivity/60)/60);
min := Remainder(Truncate(productivity/60),60);
sec := Remainder(productivity,60);
hhmmss := totext(hrs,"00") + ":" + totext(min,"00");
STOP.....
I am concerned about the vol / secs calc is correct. Is the calc being divided by seconds or hours? I need hours.
START....
numberVar vol;
numberVar secs;
numberVar productivity;
vol := Sum ({sp_get_Operator_Stats_ByDate_More_Than_One;1.Imgv_Imgs}, {sp_get_Operator_Stats_ByDate_More_Than_One;1.operatorid});
secs := Sum ({sp_get_Operator_Stats_ByDate_More_Than_One;1.Imgv_Secs}, {sp_get_Operator_Stats_ByDate_More_Than_One;1.operatorid});
if secs <> 0 and vol <> 0 then
productivity := vol/((secs/60)/60)
else
productivity := 0;
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;
hrs := Truncate(Truncate(productivity/60)/60);
min := Remainder(Truncate(productivity/60),60);
sec := Remainder(productivity,60);
hhmmss := totext(hrs,"00") + ":" + totext(min,"00");
STOP.....
I am concerned about the vol / secs calc is correct. Is the calc being divided by seconds or hours? I need hours.