Converting to different date format
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I would like to convert this date:
2012-09-01
to
2012-9-1
How can I do this?
Thanks,
0 个评论
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2012-9-4
d='2009-09-01'
c=regexp(d,'-','split')';
e=[c{1} '-' num2str(str2num(c{2})) '-' num2str(str2num(c{3}))]
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!