circa1 = xlsread(fileToRead); [numOnly, textOnly, rawDataInCellArray] = xlsread(fileToRead); Dates=textOnly(~cellfun('isempty',textOnly)); matchresult = regexp(Dates, '(?<day>\d+)/(?<month>\d+)/(?<year>\d+)'); nomatch = cellfun(@isempty, matchresult); dateless = Dates(nomatch); datelike = Dates(~nomatch); dateliketime=datetime(datelike); liatime=dateliketime.Month == 10;Warning: Successfully read the date/time strings using the format 'MM/dd/uuuu', but their format is ambiguous and could also be'dd/MM/uuuu'. Specify a format string to avoid ambiguity. > In guessFormat (line 59) In datetime (line 589)
I get the above error. The filtering is wrong because the format string is not properly defined. I want dd/MM/uuuu. I cannot filter out the month October successfully.
Best Answer