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

Re: Create total time formula

$
0
0

hey C Warner,

 

1) create a new formula named Seconds (to place on the Details section) with syntax like

 

timevar t := {your time field};

numbervar s:=(hour(t)*3600) + (minute(t)*60) + second(t);

 

2) right click on the Seconds formula and choose Insert > Summary > Sum and also change the Summary Location to be your group

 

3) now right click on the Seconds formula again and choose Insert > Summary > Average and change the Summary Location to be your group

 

4) right click on the Summary and choose Format > go to the Common tab > Display String and enter this syntax which will change the output of the formula from seconds to a readable time display.

 

numbervar ts:= currentfieldvalue;

numbervar hs;

numbervar ms;

numbervar ss;

 

 

hs:= truncate((remainder(ts,86400))/3600);

ms:= truncate((remainder(ts,3600))/60);

ss:= truncate(remainder(ts,60));

stringvar display:= totext(hs,'00') + ":" + totext(ms,'00') + ":" + totext(ss,'00');

 

 

display

 

5) if you want you can also move this summary to the Group Header and then suppress the Group Footer.


Viewing all articles
Browse latest Browse all 8667

Trending Articles



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