I have data with dates and times in separte columns. How do I put them together into a datetime format?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Timothy Potter
el 4 de Mzo. de 2019
Respondida: Timothy Potter
el 11 de Mzo. de 2019
I have data with dates and times in separate columns. How can I get them combined into a single datetime stamp column?
4 comentarios
Jan
el 6 de Mzo. de 2019
And what is the wanted result? A Matlab array or table object, another CSV file?
Please add the required details. The readers cannot guess, what you want to do.
Respuesta aceptada
Peter Perkins
el 11 de Mzo. de 2019
Timothy, in recent versions of MATLAB (since R2018a, IIRC), readtable should read those two columns as a datetime and a duration, and you can just add them. Prior to that, you'lll have to read the times in as text and convert to duration. You can use this File Exchange post. After that, just add o the datetime.
But it looks like maybe you got there on your own!
0 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Data Type Conversion en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!