The example in the documentation for the ADDTODATE function states that the following command:
R = addtodate(datenum('12/24/1984 12:45'), 20, 'day');datestr(R)
should return the following result:
ans = 13-Jan-1999 12:45
However, when I execute the above example, I obtain a different result:
ans = 13-Jan-1985 12:45:00
Best Answer