how to convert 5.5 hour to 05:30:00 HH:MM:SS format?
Show older comments
how to convert 5.5 hour to 05:30:00 HH:MM:SS format?
Accepted Answer
More Answers (1)
a = hours(5.5);
b = datetime('00:00:00','Format','HH:mm:ss');
result = a+b
result =
datetime
05:30:00
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!