Home>

I want to get the date and time from the serial number that is common in Excel in Python.
Example
44120.2822453740

From

2020/10/16 6-46-26

I want to get
I know how to get only the date (https://qiita.com/nezumi/items/23c301c661f5e9653f19), but I don't know when it comes to time and seconds. Of course, you can see how to convert on Excel. All you have to do is select the date from the cell formatting. I want to get it in Python.

  • Answer # 1

    It comes out when you go around with "excel date value" and "excel time value", but the integer part of the number contains the total number of days, and the decimal part contains the time value with 1 day as 1.
    If you know this, you can calculate back from that number.