How to import dates?
古いコメントを表示
I have a database in excel like numbers, text and dates and I am not able to import the dates correctly. I'm using the following code
path(path, 'C:\Users\vinic\thesis\Matlab')
[data, textdata, rawdata]=xlsread('Teste',1);
Viewing rawdata the dates were imported as follows. However, the first date didn’t come just the day
'Time Stamp'
'01/06/2017'
'01/06/2017 00:10:00'
'01/06/2017 00:20:00'
'01/06/2017 00:30:00'
'01/06/2017 00:40:00'
'01/06/2017 00:50:00'
'01/06/2017 01:00:00'
'01/06/2017 01:10:00'
'01/06/2017 01:20:00'
'01/06/2017 01:30:00'
How can solve this problem?
I need the first item to appear as follows
'01/06/2017 00:00:00'
1 件のコメント
dpb
2020 年 5 月 4 日
The first date is still ok; it was just zero minutes and simply a formatting issue in the spreadsheet.
As the documentation notes, xlsread has been deprecated; I suggest the readtable function instead -- the resulting table will in all likelihood be much easier to work with going forward...if it is time-specific data, converting then to a timetable is probably even better.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!