Also:
>>> import datetime as dt
>>> date1 = dt.datetime.strptime('2011-12-31', '%Y-%m-%d')
>>> date2 = dt.datetime.now()
>>> diff = date2 - date1
>>> diff
datetime.timedelta(7, 65912, 169900)
>>> diff.days
7



-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to