如截图,1.5小时结果算出显示1.5002,这误差是系统的问题吧?代码如下:
If e.DataCol.Name = "结束时间" Then Dim d1 As Date = e.DataRow("结束时间") Dim d2 As Date = e.DataRow("开始时间") Dim ts As TimeSpan = d1 - d2 e.DataRow("工时数") = ts.TotalHours End If