More than 23 hour format

조회 수: 5 (최근 30일)
Andreas Grøvan Aspaas
Andreas Grøvan Aspaas 2018년 12월 3일
댓글: Walter Roberson 2018년 12월 3일
Hi. How can I import a datetime with more than 23 hour format, like from 00:00:00 to 39:27:08 in my case. With HH:mm:ss it does not work when I pass 23:59:59 and I have not found another solution online yet. I got one row with 56531 cells. Thanks in advance!

채택된 답변

Walter Roberson
Walter Roberson 2018년 12월 3일
use a duration object .
  댓글 수: 2
Andreas Grøvan Aspaas
Andreas Grøvan Aspaas 2018년 12월 3일
How do I choose that object for all the cells when importing or do I have to import first by datetime or numbers or text and then choose duration object? I am quite new to matlab.
Walter Roberson
Walter Roberson 2018년 12월 3일
With new enough MATLAB readtable will detect time like fields that have no dates and will import them as duration objects .
Older MATLAB will import as cell array of character vectors in that case. For some of the most recent you release duration can parse those itself .
For older still you will need to parse the text into numeric columns and duration those .

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by