Reputation: 109
When I am running my SSRS report I am getting 468:30 but according to my SP calculation should be 2550*11/60=467.5 and 5 should be changed to 30 sec.
This is my function:
Public Function FormatHHMM(ByVal Minutes As Integer) As String
Dim iHH as Integer
Dim iMM as Integer
iHH = Minutes / 60
iMM = Minutes mod 60
Return Format(ihh,"###,##0")+":"+Format(iMM,"00")
End Function
This is the expression used in the field:
=code.FormatHHMM(Fields!Completion_BenchMarkTime.Value)
Upvotes: 1
Views: 276
Reputation: 56
Use the FLOOR function in your code to "cut" the rest of the calculation.
iHH = floor(Minutes / 60)
Upvotes: 1