The following Matlab project contains the source code and Matlab examples used for round off dates and times. 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')
The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there.