How do I go from Excel serial date numbers to use in MATLAB without the Financial Toolbox?

3 vues (au cours des 30 derniers jours)
How do I convert my Excel serial date numbers to use in MATLAB?
I do not have the Financial Toolbox so I cannot use the "x2mdate" function.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 24 Avr 2018
Use readtable to import the dates from the spreadsheet as datetimes.
Alternatively, If the Excel dates have already been imported into MATLAB as numbers then converting from Excel serial date numbers to MATLAB datetime format can be done with the "datetime" function by using the 'ConvertFrom' option.
  1 commentaire
Peter Perkins
Peter Perkins le 6 Avr 2018
This is the right thing to do if the Excel dates have already been imported into MATLAB as numbers. But in many cases, the right thing to do is to use readtable to import the dates from the spreadsheet as datetimes, no conversion necessary.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Produits


Version

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by