Before R2014b I used serial date numbers to represent date and time in MATLAB. In R2014b I can use datetime arrays, but when I convert serial date numbers to datetimes, I find that there seems to be a difference of one second between the datetimes and the serial date numbers.
For instance:
>> myDateNum = datenum(2014, 09, 01, 10, 0, 0);>> datetime(myDateNum, 'ConvertFrom', 'datenum') ans = 01-Sep-2014 09:59:59 >> datestr(myDateNum) ans = 01-Sep-2014 10:00:00
Best Answer