Skip to content

Instantly share code, notes, and snippets.

@MuddyBootsCode
Last active March 15, 2018 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MuddyBootsCode/db3e80b569141a5a2b783d608cc033bf to your computer and use it in GitHub Desktop.
Save MuddyBootsCode/db3e80b569141a5a2b783d608cc033bf to your computer and use it in GitHub Desktop.
def millisecond_date_convertor(time_in_milliseconds):
conversion = datetime.datetime.fromtimestamp(time_in_milliseconds // 1000)
return {'date': conversion.strftime("%m/%d/%Y"), 'time': conversion.strftime("%H:%M")}
@MuddyBootsCode
Copy link
Author

Converts dates given in milliseconds to string

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