importing excel file time format
이전 댓글 표시
suppose the following cell array being imported from the excel file
'Date' 'Time'
'Date' 'Time'
'Mon, Apr-25-16' 0.0763888888888889
NaN NaN
'Mon, Apr-25-16' 0.0763888888888889
'Fri, Mar-25-16' 0.0347222222222222
'Wed, Feb-24-16' 0.0347222222222222
'Tue, Jan-26-16' 0.0347222222222222
'Fri, Dec-25-15' 0.0347222222222222
'Wed, Nov-25-15' 0.0347222222222222
Column two represents time. in the originally excel file it looks like this.
Date Time
Date Time
Mon, Apr-25-16 01:50
Thu, May-26-16 01:50
Mon, Apr-25-16 01:50
Fri, Mar-25-16 00:50
Wed, Feb-24-16 00:50
Tue, Jan-26-16 00:50
Fri, Dec-25-15 00:50
Wed, Nov-25-15 00:50
How can I convert the column 2 into the original time format. Once I have the original time format I want to convert the time into minutes the following way:
Y(:,2)= hour(numFormat)*60 + minute(numFormat);
댓글 수: 1
Walter Roberson
2016년 11월 1일
Could you attach a sample file? Doing this right might depend on exactly how the data is stored.
Also, which MATLAB version are you using, and which operating system?
채택된 답변
추가 답변 (4개)
Stalin Samuel
2016년 6월 24일
0 개 추천
AA
2016년 11월 1일
편집: Walter Roberson
2016년 11월 1일
AA
2016년 11월 2일
0 개 추천
댓글 수: 1
Walter Roberson
2016년 11월 2일
Nope. Not without answers to what I asked before.
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!