python add month datetime

Solutions on MaxInterview for python add month datetime by the best coders in the world

showing results for - "python add month datetime"
Giuseppe
30 Jan 2020
1from datetime import datetime
2from dateutil.relativedelta import relativedelta
3    
4date_after_month = datetime.today()+ relativedelta(months=1)
5print 'Today: ',datetime.today().strftime('%d/%m/%Y')
6print 'After Month:', date_after_month.strftime('%d/%m/%Y')
7