convert time lengths into a nice formatted string