SSRS

Display Seconds Count in HH:MM:SS format in SSRS

Add this below VB code in Report Properties in Code session, have look on the below image
Report Properties – > code

VB Code:

Function formatSeconds(ByVal secs As Integer) As String
        Dim t As TimeSpan = TimeSpan.FromSeconds(secs)
        Return String.Format(“{0:D2}:{1:D2}:{2:D2}”,
        t.Hours, t.Minutes, t.Seconds)
End Function

Add the below expression where you want display and the input values shoud be interger or decimal. Example below

Thank You. ! I will keep post another articles soon.

Leave a Reply

Prabhakaran Jayaraman