Don’t confuse a time duration with a date time. A DateTime Item and related DateTime Objects like now in Rules represent an instant in time. At the lowest level they are literally the number of milliseconds that have passed since 1970-01-01T00:00:00.
if(isNaN(i)) return "NAN";
var mins = i%60
var totalhours = Math.floor(i/60)
var hours = totalhours%24
var days = Math.floor(totalhours/24)
var pad = "00";
If you are using Python for Rules and want to maintain a separate String Item with this representation see Scott’s link.
If using Rules DSL, the above should give you enough information to build it using Rules DSL. If not ask questions.