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

4 Ansichten (letzte 30 Tage)
Megha
Megha am 12 Dez. 2018
Kommentiert: Megha am 26 Dez. 2018
how to convert 5.5 hour to 05:30:00 HH:MM:SS format?

Akzeptierte Antwort

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

Weitere Antworten (1)

Stephan
Stephan am 12 Dez. 2018
Bearbeitet: Stephan am 12 Dez. 2018
a = hours(5.5);
b = datetime('00:00:00','Format','HH:mm:ss');
result = a+b
result =
datetime
05:30:00

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by