I've noticed that the datenum function produces two different values for the same date (9/28/2006) when the arguments are in different formats. The difference in this example is significant: 243 days.
datenum(2006,9,28)ans = 732948
but
datenum('20060928','YYYYMMDD')ans = 732705.00625
Why is this?
Best Answer