Hello all,
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:
Acknowledged that there is probably a real basic error in there, however I cannot get this to work.
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
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:
Code:
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
Comment