Round off dates and times
Version 1.1.0.0 (5.99 KB) by
Kevin J. Delaney
Rounds off a datenum to the nearest second, minute, hour, day, month or year.
Rounds off a datenum to the nearest second, minute, hour, day, month or year. Zip file includes "units.m" (file 4093) by Henning Ressing.
Example: datenum_round_off(now, 'minute')
Cite As
Kevin J. Delaney (2024). Round off dates and times (https://www.mathworks.com/matlabcentral/fileexchange/26374-round-off-dates-and-times), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2009b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Dates and Time in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.