There TimeSpan variable type that has all the time calculations functions:
To make it simple simply store time using this variable type. Then use String Append or Text format to to properly format the text. In C++ Timespan have dedicated function for that: