How to avoid dates being writen in scientific notation?
3 次查看(过去 30 天)
显示 更早的评论
I made my dates using:
m(1,1) = str2num(datestr([2015,8,10,12,0,0],'yyyymmddhhMM'));
which writes date in scientific notation into m. Is there any way to avoid that? I want my dates to be as simple as 201508101200 in m.
1 个评论
Walter Roberson
2015-8-11
Isn't this the same question as http://uk.mathworks.com/matlabcentral/answers/233121-problem-writing-in-data-into-a-csv-using-fprintf ?
采纳的回答
Jeff E
2015-8-10
If you really want it as an integer:
m = uint64(str2num(datestr([2015,8,10,12,0,0],'yyyymmddhhMM')));
更多回答(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!