I got some data in excel with date in the formate of dd/mm/yyyy
d = xlsread ('excel.xlsx','D9:D7808')
then I try to do a datenum, but it doesn't work becuase the data is in dd/mm/yyyy
so How could I convert dd/mm/yyyy to yyyy-mm-dd or convert date into serial in some other ways
Thanks

댓글 수: 2

Rik
Rik 2021년 1월 18일
Is the data stored as a date in the excel file? Or as text?
Image Analyst
Image Analyst 2021년 1월 18일
Here's another chance to read the posting guidelines you skipped over when posting:
After you remember to upload your workbook, we'll be able to help more.

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

답변 (1개)

Walter Roberson
Walter Roberson 2021년 1월 18일

0 개 추천

d = readmatrix('excel.xlsx', 'D9:D7808');
d.Format = 'yyyy-MM-dd';
And if you need to,
cellstr(d)

카테고리

도움말 센터File Exchange에서 Time Series Objects에 대해 자세히 알아보기

질문:

2021년 1월 18일

답변:

2021년 1월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by