MATLAB: Matlab not recognizing dates

dates

I have a vector of dates in the format yyyymm, however matlab is not recognizing it for a timetable. Any suggestions?

Best Answer

You did not mention how you were importing them.
Try importing them this way:
dv = {'202011'
'202012'}
datetime(dv, 'InputFormat','yyyyMM', 'Format','MM-yyyy')
That works for me.