Answers for "how to find no of months between two dates in python"

1

python months between two dates

from datetime import datetime

def diff_month(d1, d2):
    return (d1.year - d2.year) * 12 + d1.month - d2.month
Posted by: Guest on May-21-2021

Code answers related to "how to find no of months between two dates in python"

Python Answers by Framework

Browse Popular Code Answers by Language