how to convert 5.5 hour to 05:30:00 HH:MM:SS format?

3 visualizzazioni (ultimi 30 giorni)
how to convert 5.5 hour to 05:30:00 HH:MM:SS format?

Risposta accettata

Stephen23
Stephen23 il 12 Dic 2018
>> datestr(5.5/24,'HH:MM:SS')
ans = 05:30:00

Più risposte (1)

Stephan
Stephan il 12 Dic 2018
Modificato: Stephan il 12 Dic 2018
a = hours(5.5);
b = datetime('00:00:00','Format','HH:mm:ss');
result = a+b
result =
datetime
05:30:00

Categorie

Scopri di più su Dates and Time in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by