Can I find milliseconds from decimal time

조회 수: 2 (최근 30일)
Joseph Tirado
Joseph Tirado 2021년 7월 14일
댓글: Peter Perkins 2021년 7월 27일
I have a bunch of times in decimal time and I am trying to format it in hours, minutes, seconds, and milliseconds. I know how to get in hh:mm:ss but I can't get milliseconds. Is this even possible and if so how can I do it? This is how i converted to hours, minutes and seconds.
HOD=decimaltime*24
HOD=hours(HOD)
HOD.Format='hh:mm:ss'
I need to find the difference between times so I need the answer to be in time format.

채택된 답변

Star Strider
Star Strider 2021년 7월 14일
Perhaps:
HOD.Format='hh:mm:ss.SSS'
will do what you want.
See the Format property for details.
.
  댓글 수: 1
Peter Perkins
Peter Perkins 2021년 7월 27일
It's worth saying that regardless of what display format
HOD=hours(HOD)
has, it's still the same value. The display format is only for ... well, display. I mean, that's important, but it only affects what you see.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by