I believe the number of a given date correspond to the number of days since 1/1/1900. So you could in python count the number of days between those two dates using
For example :
date(2020, 7, 11) - date(2020, 7, 2) = 9
Then you replace the date value by the number you just calculated.
That said I believe it is still better to fix the problem at the source rather than in python as suggested in the comments
CLICK HERE to find out more related problems solutions.