在 crystal 报告中将整数总时间转换为 HH:MM 格式

Converting total time in integer into HH:MM format in crystal report

我正在使用下面给出的公式将 crystal 报告中的 3.50 小时更改为 03:30(HH:MM) 格式,但它显示 04:30(自动添加 1 小时)

numbervar totalHours:=ToNumber({Table.ExtraHoursOn1});
numbervar totalminutes:=ToNumber({Table.ExtraHoursOn1})*60 mod 60;
ToText(totalHours,0)+':'+
ToText(totalminutes,'00')

我不知道我哪里错了。

这是更改格式的正确语法,缺少截断函数

numbervar totalHours:=ToNumber({Table.ExtraHoursOn1});
numbervar totalminutes:=ToNumber({Table.ExtraHoursOn1})*60 mod 60;
ToText(Truncate(totalHours),0)+':'+
ToText(totalminutes,'00')