Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python months between two dates

from datetime import datetime

def diff_month(d1, d2):
    return (d1.year - d2.year) * 12 + d1.month - d2.month
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #months #dates
ADD COMMENT
Topic
Name
2+2 =