![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175805/image.png)
When using the import tool to import data from an excel file, how do I convert the spreadsheet dates to datenumbers?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/145550/image.jpeg)
0 commentaires
Réponse acceptée
Umakant
le 29 Sep 2014
To convert dates from spreadsheets to Date Number add a new rule for converting dates to Date Number. To add this rule:
1) Select “Convert” from drop down list in middle of the import window then Spreadsheets dates to->datenum from next dropdown lists.
2) Click “Import Selection” button this will import the selected data to the workspace in Date Numbers.
Please refer to following link for information on importing spreadsheet data:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175805/image.png)
Plus de réponses (2)
Joseph Cheng
le 29 Sep 2014
Modifié(e) : Joseph Cheng
le 29 Sep 2014
you'll have to have the rules for the "unimportable Cells" portion to have:
- Convert Spreadsheet dates to datenum
- exclude rows with unimportable cells
0 commentaires
Sean de Wolski
le 29 Sep 2014
You could also click the drop down arrow next to the column and select date as the option:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175807/image.png)
1 commentaire
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!