datestr generating different string
1 回表示 (過去 30 日間)
古いコメントを表示
I have an array with days, months and years. This is my string
[myd '/' mym '/' myy]
ans =
20/01/2014
But datestr generates this
datestr([myd '/' mym '/' myy])
ans =
06-Jul-0025
Any clue?
Thanks
0 件のコメント
採用された回答
Chad Greene
2021 年 5 月 1 日
How about
myy = 2014;
mym = 1;
myd = 20;
datestr(datenum(myy,mym,myd),'dd/mm/yyyy')
3 件のコメント
Chad Greene
2021 年 5 月 1 日
How's this?
datestr(datenum(string([myd '/' mym '/' myy]),'dd/mm/yyyy'))
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!