Convert hour, minute, and day to fraction of a day
Show older comments
Was doing something a few weeks ago in which we had to convert the date to a fraction of a day (hour and minutes) but this time we have to do hour, minute, and seconds. Assuming the process would be similar but having difficulties with the seconds aspect.
This is the code:
fracday = (1/24){floor (HHMM * 0.01) + [(HHMM * 0.01 - Floor (HHMM * 0.01)) / 0.6]
1 Comment
Guillaume
on 17 Oct 2018
What is HHMM?
Accepted Answer
More Answers (0)
Categories
Find more on Dates and Time 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!