Skip to content

Instantly share code, notes, and snippets.

@miohtama
Created May 28, 2012 23:09
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 miohtama/2821586 to your computer and use it in GitHub Desktop.
Save miohtama/2821586 to your computer and use it in GitHub Desktop.
Parsing European day.month.year date in Python
import datetime
string = "1.1.2012"
date = datetime.datetime.strptime(string, '%d.%m.%Y').date()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment