Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Date(class:cell) type problem
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have cell array containing only dates(imported from excel) I want to change them into YYYYMMDD type. Datestr doesn't work and I tried cell2mat then datestr, but the result is quite wierd since many of the dates are missing from the result. I tried to export to excel to set the date type but some of them remain the same. So I am wondering how can I deal with this? driving me nuts. Thank you so much!
0 comentarios
Respuestas (2)
Anthony Smith
el 17 de Jun. de 2011
datestr seems to only operate on strings so you probably need to access the contents of each cell individually rather than using an array operation. Using datestr format 29 for example:
for i=1:size(cellArray,1)
for j=1:size(cellArray,2)
newFormattedString = datestr(cellArray{i,j} ,29);
end
end
1 comentario
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!