@dkhayes117's expression works, but to get the format as you requested it would need to be this:
stringFormat("%01dd %02d:%02d:%02d.%03d",
daysBetween({[.]StartTime}, now()),
hoursBetween({[.]StartTime}, now()) % 24,
minutesBetween({[.]StartTime}, now()) % 60,
secondsBetween({[.]StartTime}, now()) % 60,
millisBetween({[.]StartTime}, now()) % 1000
)
Using Phil's method without the his module would look like this:
concat(
toInt(millisBetween({[.]StartTime},now()) / 86400000),'d ', //days
numberFormat((millisBetween({[.]StartTime},now()) / 3600000) % 24,'00'),':', // hours
numberFormat((millisBetween({[.]StartTime},now()) / 60000) % 60, '00'), ':', // minutes
numberFormat((millisBetween({[.]StartTime},now()) / 1000) % 60, '00'),'.', // seconds
numberFormat(millisBetween({[.]StartTime},now()) % 1000, '000')
)
Using Phil's method with his module would look like this:
transform(millisBetween({[.]StartTime},now()),
concat(
toInt(value() / 86400000),'d ', //days
numberFormat((value() / 3600000) % 24,'00'),':', // hours
numberFormat((value() / 60000) % 60, '00'), ':', // minutes
numberFormat((value() / 1000) % 60, '00'),'.', // seconds
numberFormat(value() % 1000, '000')
)
)
Phil's module comes highly recommended by myself and many others. The transform expression should make the expression much more performant when compared to it's native equivalent.
All three expressions return the same result given the same starting values.