Convert date from number to format in matllab

조회 수: 3 (최근 30일)
NN
NN 2021년 1월 31일
편집: Walter Roberson 2021년 2월 5일
I have original time and date format as mentioned below:
2/17/2020 9:48:18 AM
I did forecasting using this , and after forecasting output date in the plot appears in number format like :
43878.4085416667
How can i convert it back to original date and time format ?
  댓글 수: 9
NN
NN 2021년 1월 31일
This is the output i am getting . i need to convert it back to date time format
NN
NN 2021년 1월 31일
i tried converting it to character array using below code ,
S = double(out);
S1=datestr(S);
but still not able to plot

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2021년 1월 31일
outd = datetime(out, 'convertfrom', 'excel');
plot(outd)
  댓글 수: 10
Walter Roberson
Walter Roberson 2021년 2월 5일
편집: Walter Roberson 2021년 2월 5일
I was right, the bug is in character #11 of line 7 of your code. (Prove me wrong!)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by