Skip to content

Instantly share code, notes, and snippets.

@ugo-nama-kun
Created June 8, 2021 06:36
Show Gist options
  • Save ugo-nama-kun/7a8dbc46ae93b4fe7bd2d2950698802f to your computer and use it in GitHub Desktop.
Save ugo-nama-kun/7a8dbc46ae93b4fe7bd2d2950698802f to your computer and use it in GitHub Desktop.
Get a timestamp!
from datetime import datetime
s = datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
print(s)
"""
You'll get something like.... 🍺
'2021-06-08-15-35-32'
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment