Info
This question is closed. Reopen it to edit or answer.
bug of addtodate when combining with now?
1 view (last 30 days)
Show older comments
addtodate function returns very odd results when combined with now.
>>datestr(now,'yyyymmdd')
ans =
20140814
>>datestr(addtodate(now,-1,'day'),'yyyymmdd')
ans =
19700101
>>datestr(addtodate(now,1,'day'),'yyyymmdd')
ans =
19700101
Is that a known bug? Or have I missed something obvious?
3 Comments
dpb
on 14 Aug 2014
Also
which now
which addtodate
just to be sure haven't aliased something somehow.
If after all the sanity checks and 'clear all' still does it, it's bug report time, fur shure...
Also, indeed can't reproduce it here, either R2012b which is getting somewhat date, granted...
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!