Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Averaged hh,mm,ss to seconds Post Reply Post New Topic
Author Message
sjr40
Newbie
Newbie


Joined: 09 Jun 2008
Online Status: Offline
Posts: 7
Quote sjr40 Replybullet Topic: Averaged hh,mm,ss to seconds
    Posted: 23 Jul 2008 at 2:44am
I have several fields created with the code below :
 
local numberVar RemainingSeconds;
local numberVar Hours;
local numberVar Minutes;
local numberVar Seconds;
Hours := Truncate (({@average seconds})/3600);
RemainingSeconds := ({@average seconds}) - (Hours*3600);
Minutes := Truncate ({@average seconds}/60);
Seconds := ({@average seconds}) - (Hours*3600) - (Minutes*60);
totext(Hours,"00") + "hrs " +
totext(Minutes,"00") +"mins " +
totext(Seconds,"00") +"secs ";
 
As you can see they are averaged times.
I now have to sum these averaged fields for subtotals per record.
How can I do this ?
Do I convert each field back to seconds, sum then convert back to hh, mm, ss format ?
Proving really tricky due to the averaging of  the times.
Thanks
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.