Can I find milliseconds from decimal time

2 vues (au cours des 30 derniers jours)
Joseph Tirado
Joseph Tirado le 14 Juil 2021
Commenté : Peter Perkins le 27 Juil 2021
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.

Réponse acceptée

Star Strider
Star Strider le 14 Juil 2021
Perhaps:
HOD.Format='hh:mm:ss.SSS'
will do what you want.
See the Format property for details.
.
  1 commentaire
Peter Perkins
Peter Perkins le 27 Juil 2021
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by