What is "formula field Total Time" ? Please clarify.
The Formula computation needs to actually return the string that you want to display. That is, what i think you want to do is add a final line that returns the string you want to display.
return dhm(data3);
You have a field of type "String" and your formula returns a string in format "00:00".