Floor and fix above all if you want to round down there are two ways of doing so depending on your goals. Round ceil and floor matlab datenumbers file exchange source. Round towards minus infinity.