I am not certain if the numbers are themselves strings, or numbers.
If they are numbers, this works:
numdate = [200309302300
200309302310
200309302320];
dn = datenum(num2str(numdate), 'yyyymmddHHMM')
dv = datevec(dn)
dt = datetime(num2str(numdate), 'InputFormat','yyyyMMddHHmm')
If they are strings, omit the str2num calls and just insert them directly.
Best Answer