Skip to content

Instantly share code, notes, and snippets.

@10nin
Created February 17, 2015 14:02
Show Gist options
  • Save 10nin/53a95f20dc3f2eee9c74 to your computer and use it in GitHub Desktop.
Save 10nin/53a95f20dc3f2eee9c74 to your computer and use it in GitHub Desktop.
Get time stamp string formatted '%Y-%m-%d %H:%M'.
def get_timestamp():
from datetime import datetime
return datetime.now().strftime('%Y-%m-%d %H:%M')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment