Reputation: 110482
What would be the best way to get a python time object form milliseconds int? For example:
ms = 2588832
datetime.timedelta(seconds = ?)
The answer I want to get is "00:43:08"
Upvotes: 2
Views: 169
Reputation: 30171
You can create timedeltas directly from milliseconds:
datetime.timedelta(milliseconds=2588832)
Upvotes: 4