how can i convert millisecond into day, hour:minutes:seconds:millisecond using linux c++.....

for example...the output like this:-

001 days 12:41:59:0985


plzz..enybody help me to create this coding....