read time in HH:mm format from excel

10 visualizaciones (últimos 30 días)
Sidharth Sanjeev Wazir
Sidharth Sanjeev Wazir el 17 de Ag. de 2023
Respondida: Walter Roberson el 18 de Ag. de 2023
I have to read a column from excel file named Time ,the data in that column is in HH:mm format i need to read it and save it and display it in same format

Respuestas (1)

Walter Roberson
Walter Roberson el 18 de Ag. de 2023
filename = 'AppropriateFileName.xlsx';
opts = detectImportOptions(filename);
opts = setvaropts(opts, {'Time'}, 'Type', 'duration', 'InputFormat', 'hh:mm', 'DurationFormat', 'hh:mm');
T = readtable(filename, opts);

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by