datetime format '2018-08-0​1T20:05:00​.000Z' having problems

4 ビュー (過去 30 日間)
Duy Doan
Duy Doan 2018 年 8 月 15 日
コメント済み: Duy Doan 2018 年 8 月 15 日
Attempting to use dateime function on a list of date times in the format: '2018-08-01T20:05:00.000Z', but I am having trouble setting up the date format so that MATLAB can convert it as such. I have tried 'yyyy-MM-dd''T'HH:mm:ss.SSS' but that doesn't seem to work. I am not sure how to address this issue.

採用された回答

Kojiro Saito
Kojiro Saito 2018 年 8 月 15 日
How about this?
dt = '2018-08-01T20:05:00.000Z';
dtTime = datetime(dt, 'InputFormat', 'yyyy-MM-dd''T''HH:mm:ss.SSS''Z')
  1 件のコメント
Duy Doan
Duy Doan 2018 年 8 月 15 日
Hi!
I was able to find out the exact format:
'yyyy-MM-dd''T''HH:mm:ss.SSSX'
Tagging this as the answer.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by