trouble using datetime format in textscan
Show older comments
this datetime format works
datetime('2021-05-01 06:10:00','inputFormat','yyyy-MM-dd HH:mm:ss')
so why won't
>> textscan('2021-05-01 06:10:00','%{yyyy-MM-dd HH:mm:ss}D')
Error using textscan
Unable to read the DATETIME data with the format 'yyyy-MM-dd HH:mm:ss'. If the data is not a time, use %q to get text data.
Thanks.
Accepted Answer
More Answers (1)
Simon Chan
on 20 Jul 2021
0 votes
Detail explanation here: How do I use 'textscan' to correctly read a formatted date?
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!