converting string (python) datetime to matlab

15 ビュー (過去 30 日間)
Sonia Sonia
Sonia Sonia 2020 年 8 月 19 日
編集済み: jonas 2020 年 8 月 19 日
I have a datatime string which looks like so:
datatime_str='2020-08-18 16:48:13.722422+00:00'
I then do in matlab 2018a:
fmt_dt='yyyy-MM-dd HH:mm:ss.SSSSSS+HH:mm';
and I get:
2020-08-18 00:00:13.722422+00:00
I am not sure what it is that I am doing wrong, but the result is obviously wrong :(
Any help would be great
  1 件のコメント
Serhii Tetora
Serhii Tetora 2020 年 8 月 19 日


回答 (1 件)

jonas 2020 年 8 月 19 日
編集済み: jonas 2020 年 8 月 19 日
fmt_dt='yyyy-MM-dd HH:mm:ss.SSSSSSZ';
Also, as noted in the comments, Format should be replaced by InputFormat


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by