How to change the date-format of an existing file ?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dear community,
Applying the 'readcell'-function to one of my existing files (here: .xls and .xlsx- files) I get the following error:
'Error using readcell (line 151)
Could not recognize the date/time format of '15-März-2019'. You can specify a format using the 'InputFormat' parameter. If the date/time text contains day, month, or time zone names in a language foreign to the 'en_US' locale, those might not be recognized. You can specify a different locale using the 'Locale' parameter.'
How can I change the it? Please consider the attachment.
0 Commenti
Risposte (1)
Walter Roberson
il 18 Gen 2021
datetime('15-März-2019', 'Locale', 'de')
So use readcell() with 'Locale', 'de'
6 Commenti
Walter Roberson
il 27 Gen 2021
readtable returns a table object, whereas readcell returns a cell array in which each entry is a separate cell, so Yes, it does matter.
Using {:,2} would be wrong for readcell but I think it should work for readtable as it should return the second variable as a single argument.
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!