I have a field called 'obs hours' which calculates time in HH:MM between StartDateHeader and EndDateHeader and then I have 'carve out' time field which calculates time in HH:MM between StartDateDept and EndDateDept
Now I want to subtract carve out time field from obs hours field
below are the expression used for field obs hours example : total obs hours 46 hh:59 mm)
=DATEDIFF("h",Fields!StartDateHeader.Value,Fields!EndDateHeader.Value) & ":" & DATEDIFF("n",Fields!StartDateHeader.Value,Fields!EndDateHeader.Value) MOD 60
below are the expressions used for carve out field (example 00 hh:10mm)
=DATEDIFF("h",Fields!StartDateDept.Value,Fields!EndDateDept.Value)& ":" & DATEDIFF("n",Fields!StartDateDept.Value,Fields!EndDateDept.Value) MOD 60
I don't want to convert these in to decimal format i just want the answer to be in hh:mm format and my answer should be like (example)
obs hours : 46:59
carve out time : 0.10
**Total bill hours : 46.49**
Total bill hours expression is needed please
答案 0 :(得分:0)
为了简化操作,我将创建一个计算字段,以秒为单位获取两个日期之间的差异。
=DATEDIFF("s", Fields!START_DATE.Value, Fields!END_DATE.Value)
然后,文本框表达式将在计算中使用DIFF字段:
=Floor(Fields!DIFF.Value / 3600) &":"& Format(DateAdd("s", Fields!DIFF.Value, "00:00"), "mm:ss")
以下是一些示例数据和结果: