MATLAB: .csv Date and Time assigned Data Import

csvdate and time assigned data;trial data

Hi dear Community,
I need to import csv data from Trials into MATLAB. The dataset is as follows:
2016/11/02 17:51:54,017;256,451812744141;0;0;0,130208298563957
I tried to achieve the import with csvread, but I guess, matlab cannot handle date and time in one cell?! Another problem may be, that the decimal delimiter symbol is ',' and not '.'. Actually, I don't need the date, I only need the time and the difference of the time between adjacent measurements as an additional column.
Help is very appreciated, thanks therefore in advance! Best Wishes, Georg

Best Answer

Hi George,
If you're using R2016b you can import this directly, but it will take a little bit of configuration The following should work:
opts = detectImportOptions(yourfilename,'Delimiter',';')
opts.VariableTypes = {'datetime','double','double','double','double'};
opts = setvaropts(opts,1,'InputFormat','yyyy/MM/DD HH:mm:ss,SSS');
opts = setvaropts(opts,2:5,'DecimalSeparator',',');
T = readtable(yourfilename,opts)