Unable to read datetime with format "0600 UTC OCT 25"
古いコメントを表示
When I import data from a kml file using readtable, it stores the date and time in a string array called Name formatted like this:
"1200 UTC OCT 10"
"1800 UTC OCT 10"
"0000 UTC OCT 11"
"0600 UTC OCT 11"
In the latest round of my bout with datetime, I'm struggling to get this into a datetime variable.
I have tried this, but it doesn't work:
datimStorm = datetime( Name, 'InputFormat', 'hhmm ''UTC'' MM yy' );
Can this be done using the 'InputFormat', or do I have to do it myself with substrings?
採用された回答
その他の回答 (1 件)
t = "1200 UTC OCT 10"
td = datetime(t,'InputFormat','hhmm ''UTC'' MMM dd')
2 件のコメント
Ooops should have been
t = "1200 UTC OCT 10"
td = datetime(t,'InputFormat','HHmm ''UTC'' MMM dd')
dormant
2023 年 10 月 25 日
カテゴリ
ヘルプ センター および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!