Say I convert some seconds into the TimeSpan object like this:
Dim sec = 1254234568
Dim t As TimeSpan = TimeSpan.FromSeconds(sec)
How do I format the TimeSpan object into a format like the following:
>105hr 56mn 47sec
Is there a built-in function or do I need to write a custom function?
Well, the simplest thing to do is to format this yourself, e.g.
In VB:
I don’t know whether any of the
TimeSpanformatting in .NET 4 would make this simpler.