How to convert table with datetime in numeric (seconds)
2 ビュー (過去 30 日間)
古いコメントを表示
I want to convert a table ('Zeitt' 1000x1 table) with the format 'dd-mmm-yyyy HH:mm:ss.SSS' (ist that right?) like '15-Jul-2022 12:12:43.086' into a number (seconds that passed by since the first date)
I tried many differnt commands, but still got errors, f.e.:
Zeit = datetime(Zeitt, 'InputFormat', 'dd-mmm-yyyy HH:mm:ss.SSS');
or
Zeit=datenum(Zeitt,'dd-mmm-yy HH:mm:ss.SSS',2021);
or
Zeit=convertTo (Zeitt,'.net');
2 件のコメント
Stephen23
2022 年 7 月 18 日
@Miriam: please save your data (table) in a mat file, and then upload it by clicking the paperclip button.
採用された回答
Abderrahim. B
2022 年 7 月 18 日
Hi!
Try this:
load Zeitt.mat
time_sec = seconds(Zeitt.Time - Zeitt.Time(1))
Hope this helps
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!