how to load dates from xlsx files into matlab

조회 수: 1 (최근 30일)
Ida Lunde Hygum
Ida Lunde Hygum 2018년 3월 27일
답변: Star Strider 2018년 3월 27일
Hi guys,
I am trying to load dates from an excel file into matlab, but it loads it as numbers and when I use "datestring" it turns it into dates, but starting from one day a head of original data and the year "114" instead of "2014", for example I have the original date "12/03/2014", but matlab reads it as "13-Mar-0114". My code looks like this:
datoreading=xlsread('dato.xlsx');
date_data=datestr(datoreading);
I checked that the cell in excel is in the format "Date", so this should not be the problem.
Hope somebody can help me out here! Cheers, Ida

채택된 답변

Star Strider
Star Strider 2018년 3월 27일
Without your data to work with, we cannot troubleshoot the problem.
Your best option is likely the readtable (link) function.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by