Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert seconds to HH:MM:SS
#1
Need to convert seconds to HH:MM:SS
I found this post listed in the code remarks not to sure on how to modify.
Any help appreciated!

Function Secs_To_HHMMSS
Code:
Copy      Help
/ Secs_To_HHMMSS
;;; Convert number of seconds to HH:MM:SS  
int hh mm ss cnt
cnt = 3665    ;; seconds

;; below is code from post:  "https://www.quickmacros.com/forum/showthread.php?tid=4472&highlight=SECONDS+TO+HOURS"
;;; Not to sure how to implement or if it's correct formula for this purpose...  
int ns=60*60+(60*60)+61    ;; original was "int ns=60*60*24+(60*60)+61" I removed the *24 for the days.
out TimeSpanToStr(TimeSpanFromParts(0 0 0 ns))


Messages In This Thread
Convert seconds to HH:MM:SS - by ScottF - 02-05-2021, 12:59 PM
RE: Convert seconds to HH:MM:SS - by Kevin - 02-05-2021, 01:49 PM
RE: Convert seconds to HH:MM:SS - by ScottF - 02-05-2021, 03:25 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)