Skip to content

Instantly share code, notes, and snippets.

@melvinlee
Created July 30, 2015 15:49
Show Gist options
  • Save melvinlee/914221bb1b8b85c25047 to your computer and use it in GitHub Desktop.
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)
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