Aug-05-2019, 06:00 PM
(This post was last modified: Aug-05-2019, 06:04 PM by python_newbie09.)
(Aug-05-2019, 05:56 PM)buran Wrote:(Aug-05-2019, 05:54 PM)python_newbie09 Wrote: timestamp has a different encoding compared to the first one and that's what I am trying to figure out now. They are matlab files and it's really painful with these files somehow being saved with different encodingsencoding is something different and it has nothing to do with timestamp format.
Okay, so when I used the script below in matlab, I am getting a more appropriate timestamp
t = datetime(42737.614433,'ConvertFrom','excel')
t =
datetime
02-Jan-2017 14:44:47
So it has something to do with the file being recorded in excel before saving as a matlab file, i guess
(Aug-05-2019, 06:00 PM)python_newbie09 Wrote:(Aug-05-2019, 05:56 PM)buran Wrote: encoding is something different and it has nothing to do with timestamp format.
Okay, so when I used the script below in matlab, I am getting a more appropriate timestamp
t = datetime(42737.614433,'ConvertFrom','excel')
t =
datetime
02-Jan-2017 14:44:47
So it has something to do with the file being recorded in excel before saving as a matlab file, i guess
in python, i have to use the code below to get the same result.
t = pd.to_datetime('1899-12-30') + pd.to_timedelta(42737.614433,'D')