just to clarify: the second example is not our website but OpenStreetMap using OSRM routing.
In the playground the time shows if you hover across the route geometry or you switch to the Code tab (<>) in properties.summary. You then still would have to format it yourself.
You need to extract it programatically from the JSON response object.
It is in features[0].properties.summary.duration of the response.
The value is in seconds.
In the playground you can only look at it.
If you want to use it you need to send the request inside some application or script and then use the above value and format it to your desired output.
That said, this has nothing to do with ORS itself.
Please use a search engine and look how to do that.