How to specify a date string format when using xlsread from Excel?
1 次查看(过去 30 天)
显示 更早的评论
When I use xlsread to import dates, I receive the following warning: Warning: Successfully read the date/time strings using the format 'MM/dd/uuuu', but their format is ambiguous and could also be 'dd/MM/uuuu'. Specify a format string to avoid ambiguity.
How do I specify a date format when reading dates from Excel? I do not see an option to do so in xlsread.
1 个评论
Jeremy Hughes
2018-2-13
Hi Kathrine,
Can you share some code? and a file? I'm not sure this is coming from XLSREAD. As far as I know, XLSREAD treats dates as text.
Jeremy
回答(2 个)
Peter Perkins
2018-2-15
Katherine, consider using readtable instead of xlsread. In recent versions, importing dates is much simpler than using xlsread.
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!