Skip to content

Instantly share code, notes, and snippets.

@polotek
Created February 25, 2010 17:35
Show Gist options
  • Save polotek/314787 to your computer and use it in GitHub Desktop.
Save polotek/314787 to your computer and use it in GitHub Desktop.
"""
various python utils just for my reference
"""
# convert string to datetime
import time
from datetime import datetime
day = datetime.fromtimestamp(time.mktime(time.strptime(d, '%B %d, %Y')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment