transforming mm():mm() to 'yyyy/mm'
1 view (last 30 days)
Show older comments
date = mm(2020,1):mm(2020,3);
ans = 24240e+04 24241e+04 24242e+04
how to transform date to '2020/01','2020/02','2020/03'?
I used formatOut = 'yyyy/mm';d = datestr(date,formatOut); but it didn't work.
0 Comments
Answers (1)
Walter Roberson
on 23 May 2020
datetime(date,'convertfrom', 'excel', 'format', 'yyyy-MM')
0 Comments
See Also
Categories
Find more on Time Series Objects 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!