Topic: Sum & Average of times
Oldest Post First
Newest Post First
Author
Message
hayfsh
Newbie
Joined: 29 Oct 2013
Online Status: Offline
Posts: 10
Topic: Sum & Average of times Posted: 22 Jul 2014 at 10:45pm
Hello
I am looking for some help in creating a formula which will give me the total time spent on calls during a period.
I have used the below formula to calculate the time spent on each call, but I need to sum this total but an struggling to find a solution.
NumberVar TotalSec := DateDiff ("s" ,{work_order.work_started_date_time}, {work_order.work_finished_date_time});
NumberVar Days := Truncate (TotalSec / 86400);
NumberVar Hours := Truncate (Remainder ( TotalSec , 86400) / 3600) ;
NumberVar Minutes := Truncate (Remainder ( TotalSec , 3600) / 60) ;
NumberVar Seconds := Remainder (TotalSec , 60) ;
if Days >= 1 and Hours < 24 then Totext ( Days , '00' ) + ' Days' +chr(13) + Totext ( Hours , '00' ) + ' Hours' + chr(13) + Totext ( Minutes , '00') + ' Mins'
else
if Hours >= 1 and Hours < 24 then Totext ( Hours , '00' ) + ' Hours' + chr(13) + Totext ( Minutes , '00') + ' Mins'
else
if Minutes >=0 and Hours < 1 then Totext ( Minutes , '00') + ' Mins';
Further to the above total I will then need to find the average time spent on a call so any help on this also would be appreciated.
Cheers
IP Logged
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum
This page was generated in 0.016 seconds.