Created
July 30, 2015 15:49
-
-
Save melvinlee/914221bb1b8b85c25047 to your computer and use it in GitHub Desktop.
Converts seconds into a string in the format of days.hours:minutes:seconds. (0.00:05:12)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function (NumberVar interval) | |
NumberVar Days := Truncate(interval / 86400); | |
NumberVar Hours := Truncate(Remainder(interval, 86400) / 3600); | |
NumberVar Minutes := Truncate(Remainder(interval, 3600) / 60); | |
NumberVar Seconds := Remainder(interval, 60); | |
Totext(Days,'##') +'.'+ Totext(Hours,'00') +':'+ Totext(Minutes,'00') +':'+ Totext(Seconds,'00') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment