Convert seconds to HH MM SS

This is almost the "right" answer - slightly cleaner/better is to just use stringFormat:

stringFormat("%02d:%02d:%02d", 
	hoursBetween({Root Container.Popup Calendar.date}, now()),
	minutesBetween({Root Container.Popup Calendar.date}, now()) % 60,
	secondsBetween({Root Container.Popup Calendar.date}, now()) % 60
)

Note that it's worth a disclaimer that this will "break" if you overflow 24 hours. You can solve that with an additional if statement and more complex logic, but I'll leave that for the reader.

3 Likes