Convert Seconds to a String like "1 day, 17 hours, 12 minutes, 11 seconds"

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

Version Compatibility:

More information:
Examples:
  • SecondsToText(1) returns "1 second"
  • SecondsToText(2) returns "2 seconds" (automatically sets plural)
  • SecondsToText(3925) returns "1 hour, 5 minutes, 25 seconds"
  • SecondsToText(390370) returns "4 days, 12 hours, 26 minutes, 10 seconds"

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

Declarations:

Code: