Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8556

Re: How do I convert a group summary average from seconds to DD:HH:MM:SS

$
0
0

Is the following code correct?

How do I refer to the Summary_field since it is a calucuated value and not a field in my source table?

 



Local NumberVar TotalSec :=  {Summary_field};

Local NumberVar Days    := Truncate  (TotalSec / 86400);

Local NumberVar Hours   := Truncate  (Remainder ( TotalSec , 86400) / 3600) ;

Local NumberVar Minutes := Truncate  (Remainder ( TotalSec , 3600) / 60) ;

Local NumberVar Seconds := Remainder (TotalSec , 60) ;



Totext ( Days ,    '##' ) +  ':' +

Totext ( Hours ,   '00' ) +  ':' +

Totext ( Minutes , '00' ) +  ':' +

Totext ( Seconds , '00' )

 

-Mike


Viewing all articles
Browse latest Browse all 8556

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>