1
2
3
4
5
6
from datetime import date
from time import strptime

...
date(*strptime('2009-03-28', '%Y-%m-%d')[:3])
...