I have to get a datetime
from a float using Python. I am tryint to use the following code:
import time
print (time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(float(63650571169.50261))))
But when executing this code, I get an error:
OSError: [Errno 22] Invalid argument
The sys.float_info.max
displays 1.7976931348623157e+308
.
How do I convert this float number into a datetime
?