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!