MATLAB: Cell array filtering date and time using datenum

error date

I have a cell array that consists of dates and time in the following format '30/12/2015 15:54:30'.
Using this code
numFormat = datenum(X{:,1},'dd/mm/yyyy HH:MM:SS');
Y(:,1)= round(numFormat);
Y(:,2)= hour(numFormat)*60 + minute(numFormat);
I get the error message: Error using datenum. Too many input arguments.

Best Answer

Replace X{:} by char(X)
>> X = {'30/12/2015 15:54:30';'30/12/2015 15:54:30';'30/12/2015 15:54:30'};
>> numFormat = datenum(char(X),'dd/mm/yyyy HH:MM:SS')
numFormat =
1.0e+05 *
7.3633
7.3633
7.3633