Skip to content

Instantly share code, notes, and snippets.

@la5942
Last active April 13, 2023 16:09
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save la5942/91aa8151cae6ab4164d2 to your computer and use it in GitHub Desktop.
Save la5942/91aa8151cae6ab4164d2 to your computer and use it in GitHub Desktop.
Convert milliseconds to timedelta object (duration)
@kenankartal
Copy link

Thanks for the gist. Is there another method that converts the duration according to a specific pattern? For example, it will take milliseconds and convert it to minutes and seconds only. An approach that doesn't care about the remaining milliseconds.

E.g

duration: 204320 ms -> 03:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment