1
votes

I have a xlsx document in which the first column represents a time series:

2009-11-04 11:35:00.000

2009-11-04 11:36:00.000

2009-11-04 11:37:00.000

2009-11-04 11:38:00.000

when I read the xlsx file in matlab using the function:

[~,~,data] = xlsread(filename,1);

what I get is:

40121.4826388889

40121.4833333333

40121.4840277778

40121.4847222222

Which format is it? How can I get the time back?

Thanks a lot!

1

1 Answers

1
votes

Use the datestr function. For more information on dates and times in MATLAB, see Represent Dates and Times in MATLAB. Excel, however, has a different representation of dates from MATLAB, see When to Convert Dates from Excel Files for more information.