How to print millis in [hh:mm:ss] format?

If I use RTC(DS1307), how should I modify the code?