Hi guys,
Having some issues displaying my seconds to hour formula correctly. When I goto the cross tab my hourly formula can only be displayed as a count which I already have a count formula. When I add this formula into a row or column it shows every second for the customer. It looks something like this.
Phyllis 00:00:00 645
0.00
00:00:01 25
25.00
00:00:02 30
60.00
However, when I take the ConvertToHours formula out of the column it displays like this.
Phyllis 1,268 (Count of the report)
6,790 (Total Seconds)
This should be correct I just need to seconds converted to hours.
Here is my formula:
local numbervar RemainingSeconds;
local numbervar Hours ;
local numbervar Minutes;
local numbervar Seconds;
//divide the @TotalSeconds by 3600 to calculate
// hours. Use truncate to remove the decimal portion.
Hours := truncate(
{@TotalSeconds} / 3600);
// Subtract the hours portion to get RemainingSeconds
RemainingSeconds :=
{@TotalSeconds} - (Hours *
3600);
// Divide RemainingSeconds by 60 to get minutes.
// Use truncate to remove the decimal portion.
Minutes := truncate(RemainingSeconds/60);
// Subtract the Hours and Minutes and what is left
// over is seconds.
// Format the hours, minutes, and seconds to hh:mm:ss
totext(Hours,"00") + ":" + totext(Minutes,"00") +
":" + totext(Seconds,"00")
Thanks for all the help in advance!