When I declare a cell array of dates in different formats, I receive an error on using DATENUM. When the following code is typed:
date_array = {'02/06/2002 ', '2/5/2002 ', '2/4/2002 ', '1-Feb-02 ', '1/31/2002 ','1/30/2002 '};date_num = datenum(date_array);
The following error is obtained:
ERROR: ??? Error using ==> datenum at 174 DATENUM failed. Error using ==> dtstr2dtvecmx Failed on converting date string to date number.
Best Answer