converting times from excel file using datetime, datestr, and datenum
3 次查看(过去 30 天)
显示 更早的评论
% I started using the following line to convert a time tag from excel to matlab jMatlabDateNum = datetime(S.DateTimePST,'ConvertFrom','excel');
% But the following line
datestr(datenum('13:55:20','hh:mm:ss'),'hh:mm:ss')
% gives output that I do not understand
13:07:20
0 个评论
采纳的回答
Sean de Wolski
2015-7-30
datestr uses MM to indicate minutes, you're indicating months above.
datestr(datenum('13:55:20','hh:MM:ss'),'hh:MM:ss')
更多回答(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!