You were on the right track, it's just that you file contains two-digit year timestamps, and you need to specify that. Pragmatically, you could have just done this:
>> t = readtable('collide.csv');
>> head(t)
ans =
8×2 table
date pedestrian
__________ __________
01/01/0014 399
01/02/0014 603
01/03/0014 423
01/04/0014 418
01/05/0014 320
01/06/0014 518
01/07/0014 491
01/08/0014 616
>> t.date = t.date + calyears(2000);
>> head(t)
ans =
8×2 table
date pedestrian
__________ __________
01/01/2014 399
01/02/2014 603
01/03/2014 423
01/04/2014 418
01/05/2014 320
01/06/2014 518
01/07/2014 491
01/08/2014 616
but you can also use detectImportOptions to fix the problem before it happens. I'll show using readtimetable; in MATLAB releases before R2019b (I think) you can use readtable and then table2timetable:
>> opts = detectImportOptions('collide.csv');
>> opts = setvaropts(opts,"date","InputFormat",'MM/dd/yy');
>> tt = readtimetable('collide.csv',opts); head(tt)
ans =
8×1 timetable
date pedestrian
________ __________
01/01/14 399
01/02/14 603
01/03/14 423
01/04/14 418
01/05/14 320
01/06/14 518
01/07/14 491
01/08/14 616
The datetimes in that timetable have the same format as in your file; I'd suggest setting the format to something else:
>> tt.date.Format = 'dd-MMM-yyyy'; head(tt)
ans =
8×1 timetable
date pedestrian
___________ __________
01-Jan-2014 399
02-Jan-2014 603
03-Jan-2014 423
04-Jan-2014 418
05-Jan-2014 320
06-Jan-2014 518
07-Jan-2014 491
08-Jan-2014 616
I'm not sure what you need to do after that. The error you got from
time=datetime(collide(;,1),'ConvertFrom','datenum')
is because collide(;,1) is a table (timetable?). That input would need to be numeric, collide.date would have worked, but I recommend that you stay away from datenums. datenum and datetime don't mix, and datetime likely does everything you need.