subtract day from datetime in python
June 27th, 2011 by Lawrence David
to subtract days from a datetime object in python:
from datetime import date, timedelta
d=date.today()-timedelta(days=days_to_subtract)
June 27th, 2011 by Lawrence David
to subtract days from a datetime object in python:
from datetime import date, timedelta
d=date.today()-timedelta(days=days_to_subtract)