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

后端 未结 2 1879
灰色年华
灰色年华 2020-12-16 03:17

I have a table with a column, TotalTime that is an Integer value in seconds.

In Visual Studio / SSRS 2008 I want to display it in HH:MM:SS format.

Thanks!

2条回答
  •  有刺的猬
    2020-12-16 04:15

    For HH:mm:ss format you can use this:

    =Floor(Fields!TotalTime.Value / 3600) &":"& Format(DateAdd("s", Fields!TotalTime.Value, "00:00"), "mm:ss")
    

    In this case, for example 90000sec will be displayed as: 25:00:00

    For DD:HH:mm:ss format use this:

    Floor(Fields!TotalTime.Value / 86400) &":"& Format(DateAdd("s", Fields!TotalTime.Value, "00:00:00"), "HH:mm:ss")
    

    90000sec will be shown as: 1:01:00:00

提交回复
热议问题