how to convert date to numbers
조회 수: 3 (최근 30일)
이전 댓글 표시
so i have 200 dates on my data from 1st october....
i wanted to know if there was a trick to numbering the dates,
e.g. making 1st october=1
2nd october=2 etc
댓글 수: 6
dpb
2020년 2월 25일
The variable t is your table; NOT the date variable inside the table. If it is named something original like 'Date', say, then
da=day(t.Date);
채택된 답변
Star Strider
2020년 2월 25일
That also converts them to date numbers, and from there you can number them as you wish. The integer part of a date number are days, and the fractional parts are fractions of a day.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Time Series Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!