how to convert date to numbers
1 次查看(过去 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!