Datenum with a.m. and p.m.
古いコメントを表示
I have a data set with timestamps:
'11/5/2019 12 a.m. EST'
...
'11/10/2019 1 p.m. EST'
How can I convert these timestamps into a vector of date numbers?
thanks for the help.
4 件のコメント
Examples are needed. "timestamps" is a vague term. Are those datetime values? Are they date strings? What is continuous date numbers?
Please check out https://www.mathworks.com/help/matlab/date-and-time-operations.html
Walter Roberson
2019 年 11 月 15 日
Are the periods part of the text? Is it possible for the time zone to be anything other than EST (for example can it be EDT? Can it be GMT? PDT?)
Brenton Hirao
2019 年 11 月 15 日
Adam Danz
2019 年 11 月 15 日
So you're converting from strings to datenum?
https://www.mathworks.com/help/matlab/ref/datenum.html
It might be necessary to remove the dots first using strrep but maybe not (my machine has been shut down for the night).
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Time Series Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!