I\'ve read a few posts about this and thought I had some code that worked. If the difference between the 2 values is less than a 1sec then the millisecs displayed is correct
The correct answer (in 2020) is:
>>> from datetime import timedelta >>> timedelta(days=1, milliseconds=50) / timedelta(milliseconds=1) 86400050.0
The other answers lose precision and/or are more verbose.