I am trying to use "datestr" in MATLAB 8.2 (R2013b) to convert my date vector into a date string, but I am getting incorrect results. The following command works fine:
>> datestr([2014 250 200 1 1 1])
ans =
18-Apr-2035 01:01:01
If I then increase the day element to 250, I get the following incorrect results:
>> datestr([2014 250 250 1 1 1])
ans =
06-Jul-0005
06-Sep-0000
06-Sep-0000
01-Jan-0000
01-Jan-0000
01-Jan-0000
Why does "datestr" return a series of dates instead of the correct date?
Best Answer