SSRS Data Type Conversion issue | Tough one
<p>I have been working on a SSRS project and ran into several issues. I am trying to move averages and team averages on integers and then convert it to a string. </p>

<p>Please see the picture below. I am getting weird results. The issue is that when I go over 60 minutes, I do not get  01:01:00 but I get 61:00. I have tried public functions such as :</p>

<pre><code>     Public Function MinsToHHMM (ByVal Minutes As Decimal)
       Dim HourString = Floor(Minutes/60).ToString() 
       Dim MinString = Floor(Minutes Mod 60).ToString()
       Return HourString.PadLeft(2, "0") &amp; ":" &amp; MinString.PadLeft(2, "0")
     End Function 

    =Code.MinsToHHMM(Avg(Fields!test.Duration.Value))
</code></pre>

<p>I am not getting the right conversion. I am trying to get the hh : mm : ss format. </p>

<p>Anybody knows how to modify the code to get the result I want?</p>

<p><a href="https://i.stack.imgur.com/ta0gm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ta0gm.png" alt="enter image description here"></a></p>

<p>Thanks a lot!</p>

<p>Lukas</p>