Hi,
I have to read and concatenate multiple tables which all have the same number of variables. One of these variables is a datetime value which for each table comes in a different format ('dd:MM:yy hh:mm','d/MM/yyyy hh:mm', etc.) All of the formats have in common that the day precedes the month (non-US system).
The problem I have is that if I don't specify the datetime format, matlab defaults to US format in the tables that would accept it; if I specify the format, the datetime entry in the tables which don't match that format read NaT. The problem would be solved if I didn't have to specify the datetime format but could specify the default format to be in non-US style. A nice alternative would be to provide more than one datetime format and let the program pic the one that fits.
I would very much appreciate your help.
2 Comments
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/575650-readtable-with-multiple-date-formats#comment_961963
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/575650-readtable-with-multiple-date-formats#comment_961963
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/575650-readtable-with-multiple-date-formats#comment_961972
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/575650-readtable-with-multiple-date-formats#comment_961972
Sign in to comment.