Android Question How to display durations

mjcoon

Well-Known Member
Licensed User
I thought I would be able to use DateTime.Time() to display a duration which happens to originate in milliseconds (from SimpleExoPlayer).

My first test value was 311797mS, or ~311 seconds or ~5minutes.

But what I see is "01:05:11", in other words an extra hour. I can hardly add a negative hour's worth of millliseconds and expect to get a sensible answer. And DateTime is only specified to be relative to 1 January 1970, not to 01:00 on that date. So what is recoommended for displaying durations in HH:MM:SS elapsed?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top