Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: sum of time by group Post Reply Post New Topic
Author Message
Kevinbwdsb
Newbie
Newbie


Joined: 02 Mar 2016
Online Status: Offline
Posts: 10
Quote Kevinbwdsb Replybullet Topic: sum of time by group
    Posted: 01 Jun 2016 at 9:32am
I'm looking for a way to calculate the amount of time spent on calls by week. I have groups for week beginning on Sunday, that groups all the calls for that week - works fine. I have a summary to count the number of calls each week, but I need a way to calculate the amount of time spent on those calls that week. A summary works but I can't seem to figure out how to display it as hh:mm instead of a number? I don't want this is in the footer as it wouldn't make sense.

Right now I get
Week 1 - 15 calls 876
week 2 - 30 calls 480
Week 3 - 90 calls 1,987

I'd like it displayed as
Week 1 - 15 calls 14hrs, 36 minutes
week 2 - 30 calls 8hrs
Week 3 - 90 calls 33hrs, 7 minutes

Thanks in advance
Kevin
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 01 Jun 2016 at 9:40am
I use a formula to convert from seconds to hours/minutes.

totext(truncate(avgtime/3600,0),0,"")+":"+totext(truncate(avgtime/60,0)-(truncate(avgtime/3600,0)*60),"00",0,"")

Maybe not the best solution, but it works for me.
IP IP Logged
Kevinbwdsb
Newbie
Newbie


Joined: 02 Mar 2016
Online Status: Offline
Posts: 10
Quote Kevinbwdsb Replybullet Posted: 07 Jun 2016 at 4:37am
Perfect with a little tweaking I am able to get the info I needed in the format I want!

Thanks
Kevin
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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.047 seconds.