Answers for "how to increment datetime by custom months in python"

0

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'))
Posted by: Guest on February-17-2022

Code answers related to "how to increment datetime by custom months in python"

Python Answers by Framework

Browse Popular Code Answers by Language