Convert Seconds to DD:HH:MM:SS

  • I have a field in my report that I'm trying to get HH:MM:SS along with number of days.

    So far, I have this expression:

    =DATEADD("s", (IIF(RowNumber("BugID")=1, 0, DateDiff("s", Previous(Fields!DateAssigned.Value), Fields!DateAssigned.Value))), CDate("00:00")).ToString("HH:mm:ss")

    Now this is great if the difference is under 24 hours. I have some differences that's over 24 hours but the result is not reflecting that.

    Is there a way I can get the format DD:HH:MM:SS.

    If not, is it possible to have the HH to be over 23. Say for example, the difference between two time values is 26 hours and 15 minutes. I want the result 26:15:00.

    Hope my explaination was clear and I appreciate any assistance.

  • I went with a different route. If this helps anyone, this is what I did:

    =(IIF(RowNumber("BugID")=1, 0, DateDiff("s", Previous(Fields!DateAssigned.Value), Fields!DateAssigned.Value))) / 86400

    I placed this in it's own cell, next to the cell with the HH:MM:SS value.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply