MATLAB: How to read .dat file using fopen?

.dat file

I want to read a .dat using following code but I am not getting any data.
there is not allowed to upload .dat file so i uploaded in a text file fomate.
fbc = fopen('AE33.dat');
BC = fscanf(fbc, '%.f-%f-%.f,%.f:%.f:%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f,%.f');
fclose(fbc);

Best Answer

fmt = ['%{YYYY/MM/dd}D %{HH:mm:ss}D', repmat('%f', 1, 71)];
fbc = fopen('AE33.dat', 'rt', 'n', 'UTF8');
BC = textscan(fbc, fmt, 'HeaderLines', 7, 'CollectOutput', true);
fclose(fbc);
dt = BC{1}+(BC{2}-dateshift(BC{2},'start','day'));
dt.Format = 'default';
numbers = BC{3};
Now dt is a vector of datetimes read in from the first two columns of the lines, and numbers is a numeric array with 71 columns representing the data on each line after the date/time entries.