How do I fix Invalid use of operator in the Code
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
MBUNYA NERVILLE ANYANG
il 24 Mag 2023
Commentato: MBUNYA NERVILLE ANYANG
il 24 Mag 2023
I want to create a datetime table from excel having date and time in two separate columns.
T = readtable('LP.xlsx');
Col2 = datetime(str2double(T{:,2}), 'ConvertFrom','excel', 'Format','HH:mm:ss'); % Dates
Col1 = datetime(str2double({:,1}),'ConvertFrom','excel', 'Format','dd/MM/yyyy'); % Times
DT = table(Col1+timeofday(Col2), 'VariableNames',{'DateTime'}); % Combined
T = [DT T(:,3:end)]; % New Table
FirstFiveRows = T(1:5,:)
Please How do I merge column 1(Date) and column 2(Time) to one column having datetime? Thanks
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!