简体   繁体   中英

import xlsx time in matlab

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM