Hi
I need to create a cross tab which shows the staff in rows, the week number in columns and the number of hours and minutes they've worked each week as the summary field.
First two are ok but but I can't seem to pick up the correct summary for the time worked.
The formula which does the actual count of hours and minutes totals in seconds and then I convert it back to hours and minutes using this formula:
WhilePrintingRecords;
NumberVar TotalSec := Sum ({@durationtoseconds}, {@Week});
NumberVar Hours := Truncate ( TotalSec / 3600);
NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60);
Totext ( Hours, '00', 0,'') + ':'+
Totext ( Minutes,'00', 0,'')
I can use {@durationtoseconds}as the summary field in the crosstab but it returns total seconds but how do I convert it to display in hours and minutes.
Thanks
jcl5
I need to create a cross tab which shows the staff in rows, the week number in columns and the number of hours and minutes they've worked each week as the summary field.
First two are ok but but I can't seem to pick up the correct summary for the time worked.
The formula which does the actual count of hours and minutes totals in seconds and then I convert it back to hours and minutes using this formula:
WhilePrintingRecords;
NumberVar TotalSec := Sum ({@durationtoseconds}, {@Week});
NumberVar Hours := Truncate ( TotalSec / 3600);
NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60);
Totext ( Hours, '00', 0,'') + ':'+
Totext ( Minutes,'00', 0,'')
I can use {@durationtoseconds}as the summary field in the crosstab but it returns total seconds but how do I convert it to display in hours and minutes.
Thanks
jcl5