fixing a problem with the date format
显示 更早的评论
Dear all,
I have
Inside my code I construct the vector A={
'01/11'
'02/11'
'03/11'
'04/11'
'05/11'
'06/11'
'07/11'
'08/11'
'09/11'
'10/11'
'11/08'
'12/08'
'01/09'
'02/09'
'03/09'
};
But when I save the output into an excel and then open it the format of the dates is wrong and irrelevent.
Is there a way to fix it within Matlab?
thanks
1 个评论
Oleg Komarov
2012-8-2
Cannot reproduce the problem on Win7 64b R2012a.
采纳的回答
更多回答(1 个)
Andrei Bobrov
2012-8-2
xlswrite('yournamefile.xlsx',cellstr(datestr(datevec(A,'mm/yy'),'mm/yyyy')))
1 个评论
Oleg Komarov
2012-8-2
@Sabbas: you provided A not output. What is output?
类别
在 帮助中心 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!