Since the post title says "string", the direct answer is you cannot use the Formula data reference to produce a good string. You can use the Formula DR to produce an error string but you really don't want that.
The options are (a) upgrade your AF version in order to use Asset Analytics or (b) create a custom data reference. Personally, I would go with (a) as my first and only choice.
This could be an On Demand analysis. Your output could be a string or even a TimeSpan object, in which case the AFAttribute should have a type of Anything. You would have little formatting control over the TimeSpan, so the displayed value would appear as 39:02:00 for example.
Hmm, AF 2.5. That's AF 2012. Limited options as Rick already mentioned. Was thinking about mutliple formulas and string concat. But that is not available in your version.
I would say, either upgrade or implement a custom DR. Or get creative using Performance Equations.