MATLAB: Convert serial date to string in a table so that table2timetable can be used

serial datestable2timetable

Hello,
I want to import an excel sheet and convert it into a time table. Currently the dates are in serial excel format.
From what I understand table2timetable only accepts dates in string or vector format. How do I convert the format of a entire column to date string?
tbl = readtable('data.xlsx');
%convert first row of table to string date
TT = table2timetable(tbl)
Some example data from the read table:
Date Data1 Data2
_____ _________________ ________________
43373.53 275.54 43.516
43373.54 292 43.639
43373.55 215.67 43.443
Thanks!

Best Answer

TT = table2timetable(tbl(:,2:end), 'RowTimes', datetime(tbl{:,1}, 'convertfrom', 'excel'));