Thanks for reading firstly.
I am looking to format seconds into a format similar to that of an Excel "custom" format [h]:mm:ss
I have crafted the following however I am getting an error:
Expand|Select|Wrap|Line Numbers
- Public Shared Function timeFormat(Seconds As Double) as String
- if (Seconds = nothing) or (Seconds = 0)
- timeFormat = 0
- else
- Dim hours as Double = Seconds / 3600
- Dim minutes as Double = (Seconds % 3600) / 60
- Dim seconds as Double = Seconds % 60
- timeFormat = CStr(hours) & ":" & CStr(minutes) & ":" & CStr(seconds)
- end if
- End Function
I am using this as "custom code" in SQL Reporting Services 2005, Windows XP .NET 2.0
Can anybody push me in the right direction please!?
Thanks in advance?
J