excel dates
이전 댓글 표시
I understand that matlab cannot read excel dates in the sense that it changes hh:mm into decimals. This being said, is there a way of importing the dates as a string so that they would remain the same as in excel? I've tried using importdata and xlsread but neither seem to be able to!
cheers
채택된 답변
추가 답변 (1개)
Walter Roberson
2011년 11월 21일
0 개 추천
Warning: Excel represents numeric time data with a different time base than MATLAB does. There is a toolbox function that does the correction, http://www.mathworks.com/help/toolbox/finance/x2mdate.html, but you can code it yourself using the information referenced in my note in http://www.mathworks.com/matlabcentral/answers/254-converting-excel-serial-number-of-time-to-hh-mm-ss-format
댓글 수: 3
ricco
2011년 11월 21일
Walter Roberson
2011년 11월 21일
datestr(datenum('2000-03-01 15:45:17','yyyy-mm-dd HH:MM:SS'):4/(60*24):datenum('2009-10-10 10:00:00','yyyy-mm-dd HH:MM:SS'),'yyyy-mm-dd HH:MM:SS')
ricco
2011년 11월 21일
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!