Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
I have a text file contain the date and time like this 20180405125901 (2018-April-05 12:59:01), can matlab load the file and convert it to datetime like this 05-Apr-2018 12:59:01
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a text file contain the date and time like this 20180405125901 (2018-April-05 12:59:01), can matlab load the file and convert it to datetime like this 05-Apr-2018 12:59:01
0 comentarios
Respuestas (2)
Elias Gule
el 5 de Abr. de 2018
try this:
str = '20180405125901';
t = datetime(str,'InputFormat','yyyyMMddhhmmss')
1 comentario
Peter Perkins
el 6 de Abr. de 2018
If this is a CSV or similar, it's also possible to use readtable and read them in directly as datetimes. Specify the datetime format as Elias suggests. Depending on what version of MATLAB you have, detectimportoptions might also be useful.
1 comentario
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!