Skip to content

Instantly share code, notes, and snippets.

@yang-zhang
Last active August 24, 2018 18:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yang-zhang/dd2868f924031ea0667d50c4d28d4bb0 to your computer and use it in GitHub Desktop.
Format printable date time in python
import datetime
datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
datetime.datetime.now().strftime('%Y-%m-%d-%H')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment