Incorrect number or types of inputs or outputs for function 'dateshift'.
3 views (last 30 days)
Show older comments
HI, I WANT TO DO THIS:
2021 ****
2022 ****
but it give me error
dateshift(c,'start','year')
>> class(c)
ans =
'timetable'
0 Comments
Answers (1)
Walter Roberson
on 15 Aug 2023
Edited: Walter Roberson
on 15 Aug 2023
Do you actually need to change the time entries, or do you just need to have them display as years?
Changing the time entries could give challenges if it ended up with duplicate row times.
If you just want to change the display then,
c.Properties.RowTimes.Format = 'uuuu';
If you need to change the actual times then
c.Properties.RowTimes = dateshift(c.Properties.RowTimes, 'start', 'year');
Note that shifting to the start of the year is not enough to change the display to be just year.
3 Comments
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!