Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to increment datetime by custom months in python

from datetime import datetime
from dateutil.relativedelta import relativedelta
    
date_after_month = datetime.today()+ relativedelta(months=1)
print('Today: ',datetime.today().strftime('%d/%m/%Y'))
print('After Month:', date_after_month.strftime('%d/%m/%Y'))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #increment #datetime #custom #months #python
ADD COMMENT
Topic
Name
8+9 =