Adding Months to Current Date? Use relativedelta()

After minutes of surfing in the ocean of Stackoverflow, find this trick to add months to the current date (dealing with date is painful already in any language, at least to me personally). Use relativedelta() from dateutil library.


and the result shows:


Check out the date after adding two months. Voila! Just like that.


Credit:

Comments

Popular posts from this blog

Adding a Dashed Connector in Draw.io

DBeaver / PostgreSQL: "Error: database already exists" Workaround

How to Get The Replication Factor of HDFS Files