How to add months to a date (datetime object)?

bajimicbiga at gmail.com bajimicbiga at gmail.com
Thu Feb 2 05:43:49 EST 2017


for start of month to the beginning of next month

from datetime import timedelta
from dateutil.relativedelta import relativedelta

end_date = start_date + relativedelta(months=delta_period) + timedelta(days=-delta_period)



More information about the Python-list mailing list