SSRS 2005 display seconds in HH:MM:SS for durations greater than 24 hours
First off, thank you to everyone for your help!!!
All I'm trying to do is get some VB.net code that works in SSRS 2005 to display 123465 as 34:17:45.
This is what I've tried so far:
Public Shared Function secondsToString(seconds As int64) As String
Dim myTS As New TimeSpan(seconds * 10000000)
If seconds > 0 then
Return String.Format("{0:00}:{1:00}:{2:00}",myTS.Hours, myTS.Minutes, myTS.Seconds)
Else
Return ""
End if
End Function
Any 开发者_开发百科help you can provide would be great!
Thanks again!
Public Shared Function secondsToString(seconds As int64) As String
Dim myTS as new TimeSpan(seconds * 10000000)
If seconds > 0 then
Return String.Format("{0:HH\\:mm\\:ss}",seconds)
Else
Return ""
End if
End Function
Public Shared Function secondsToString(seconds As int64) As String
Dim myTS As New TimeSpan(seconds * 10000000)
If seconds > 0 then
Return String.Format("{0:00}:{1:00}",myTS.TotalHours, myTS.Minutes)
Else
Return ""
End if
End Function
精彩评论