Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Converting Seconds to Minutes Post Reply Post New Topic
Author Message
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Topic: Converting Seconds to Minutes
     Posted: 03 Jun 2010 at 4:01am
Trying to get a more precise formula for this. Currently am using this:
 
whileprintingrecords;
NumberVar Days    := Truncate (global numbervar nIReady / 86400);
NumberVar Hours   := Truncate (Remainder (global numbervar nIReady , 86400) / 3600);
NumberVar Minutes := Truncate (Remainder (global numbervar nIReady , 3600) / 60);
NumberVar Seconds := Remainder (global numbervar nIReady , 60) ;
if nIReady=0
    then 0
        else
(Days*1440)+(Hours*60) + Minutes + (Seconds/60)
 
Is there a better way of doing this? Seems like I'm getting some numbers that are a bit off with the current formula.
 
Thanks.
|< /\ '][' ( )
IP IP Logged
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