how to convert date to numbers
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Boss Man
am 25 Feb. 2020
Kommentiert: Star Strider
am 25 Feb. 2020
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 Kommentare
dpb
am 25 Feb. 2020
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);
Akzeptierte Antwort
Star Strider
am 25 Feb. 2020
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.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Time Series Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!