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 CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by