Convert Seconds to a String as D:H:M:S

Category:
Dates and Math
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This is a smaller solution than the other one I found on this site. If needed, this function could be extended using the same formulary to generate months, years and decades. Of course those would require accounting for various month lengths, leap years, etc. The syntax can easily be adjusted to run in .NET as well. The function can be tested as is. Simply copy and paste the source into your form.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: