Fetching datetime from float in Python

Viewed 122402

How does one get a datetime from a float in Python?

For e.g, I have a float such as 43111.0 and I want to get the datetime for this.

5 Answers

Here is another way

from pyxlsb import convert_date
convert_date(value)

You can use

format(convert_date(value), '%m/%d/%Y')

if you want to format it.

Related