you can use datetime module from standard library
or install and use some of the popular third-party packages that supposedly make it more convenient to work with dates. If it just for subtracting two dates built-in module should do
or install and use some of the popular third-party packages that supposedly make it more convenient to work with dates. If it just for subtracting two dates built-in module should do
>>> from datetime import datetime >>> s1='31/10/2019' >>> s2='20/09/2019' >>> d1 = datetime.strptime(s1, '%d/%m/%Y') >>> d2 = datetime.strptime(s2, '%d/%m/%Y') >>> date_diff = (d1 - d2).days >>> date_diff 41
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs