Error using strfind Conversion to double from table is not possible.
6 ビュー (過去 30 日間)
古いコメントを表示
Govind Sankar Madhavan Pillai Ramachandran Nair
2023 年 7 月 25 日
回答済み: Star Strider
2023 年 7 月 25 日
I have a table and I extracted one value from the table and it is
dataTimeColumn(1,1) = 2023-07-24T16:15:54.200
And I tried to find T in this by using strfind like this.
temp2 = strfind(dataTimeColumn(1,1),'T')
and when I run I get the error
Error using strfind
Conversion to double from table is not possible.
Why is that and how can I solve it. Thank you.
0 件のコメント
採用された回答
Star Strider
2023 年 7 月 25 日
It is apparently not an actual datetime variable (array). Instead of searching for the ‘T’ occurrences, convert it to datetime instead —
dataTimeColumn(1,1) = datetime('2023-07-24T16:15:54.200', 'InputFormat','yyyy-MM-dd''T''HH:mm:ss.SSS', 'Format','yyyy-MM-dd HH:mm:ss.SSS')
.
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!