Year conversion on figure wrong
이전 댓글 표시
If I read in a date, say 7/15/2017, but I read it in as 42931.00, when in MATLAB when I do this:
datetick('x', 'yyyy');
I get the year as 0117 instead of 2017?
답변 (1개)
per isakson
2019년 6월 29일
편집: per isakson
2019년 6월 29일
0 개 추천
That's most likely because 42931.00 is an Excel date number, not a Matlab date number.
댓글 수: 4
Benjamin Cowen
2019년 6월 29일
Walter Roberson
2019년 6월 29일
datetime 'convertfrom' 'excel'
Benjamin Cowen
2019년 6월 29일
Walter Roberson
2019년 6월 29일
date is a function that returns a single character vector, that datetime then converts into a single datetime object. If you plot with that as your only data point then MATLAB invents start and end times.
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!