Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created April 25, 2020 10:21
Show Gist options
  • Save aniruddha27/6275cef5b9ad7439479b2e128700bb8e to your computer and use it in GitHub Desktop.
Save aniruddha27/6275cef5b9ad7439479b2e128700bb8e to your computer and use it in GitHub Desktop.
from datetime import timedelta
# duration in hours
print('Duration in hours :',duration/timedelta(hours=1))
# duration in minutes
print('Duration in minutes :',duration/timedelta(minutes=1))
# duration in seconds
print('Duration in seconds :',duration/timedelta(seconds=1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment