More than 23 hour format

7 次查看(过去 30 天)
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
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 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by