Splitting time into hours : minutes : seconds from a fractional value.
10 次查看(过去 30 天)
显示 更早的评论
Hello Everyone,
Can anyone help me for converting a fractional value in the time format?
e.g. 15.76 = HH:MM:SS format.
采纳的回答
Stephan
2021-4-19
I guess 15.76 means hours in decimal numbers:
[h,m,s] = hms(hours(15.76))
d = duration(h,m,s)
gives:
h =
15
m =
45
s =
36
d =
duration
15:45:36
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!