MATLAB: How to convert serial date numbers in a table to dd-mm-yyyy

convertMATLABserial date numberstable

I am having troubles converting a column in a table from Serial Date Numbers to dd–mm-yyyy, does any one have a clue on how to solve it?
The table (T1) contans 4977 rows and 32 columns with the first column containing the Serial Date Numbers.
This is how far i got.
T1{:,1} = datetime(T1{:,1},'ConvertFrom','datenum','Format','yyyy-MM-dd');
It gives me this error:
"The following error occurred converting from datetime to double:
Undefined function 'double' for input arguments of type 'datetime'. To convert from datetimes to numeric, first subtract off a datetime origin, then convert to numeric using the SECONDS, MINUTES, HOURS, DAYS, or YEARS functions."

Best Answer

It appears to not like the LHS assignment.
This works:
dn = now + (0:9)';
T1 = table(dn);
T1.dn = datetime(T1{:,1},'ConvertFrom','datenum','Format','yyyy-MM-dd');
The curly-bracket cell notation works for accessing table values, although not for assigning them, at least with respect to datetime arrays. It appears to work correctly in other contexts such as numeric calculations.
No worries. This is new to me as well.