Format of datestr() changes
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I'm was using datestr() to get the date string instead of number, when I realised that the format of the string changes. I've data over a year with a minute interval.
January-April, June-September and November show the date like this: dd.mm.yyyy HH:MM
while May, October and December show it like this: dd-mmm-yyyy HH:MM:SS
Why is that?
6 comentarios
Walter Roberson
el 12 de Oct. de 2017
Have you attempted doing the reading using readtable() and getting datetime objects instead of having to convert yourself ?
Peter Perkins
el 13 de Oct. de 2017
As Walter says, readtable is a much better choice for reading dates from an Excel file than xlsread.
Respuestas (0)
Ver también
Categorías
Más información sobre Dates and Time 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!