Filter löschen
Filter löschen

Excel Date Format to Matlab Number Array

2 Ansichten (letzte 30 Tage)
Franco
Franco am 27 Feb. 2013
I have excel data, of which one column is in excel date format of the type '02/12/2013'. When I use xlsread, matlab gives me a number. I need to get matlab to give me an array. For instance, if 2 cells contain '02/03/2013' and '02/04/2013', I want matlab to give me an array of the following type, [02,02;03,04;2013,2013]. Anyone out there know how to do that? Thanks in advance.

Akzeptierte Antwort

Craig Cowled
Craig Cowled am 27 Feb. 2013
Have you tried using datevec?
Take one of the cells as an example ... '02/03/2013'.
>> datevec('02/03/2013','mm/dd/yyyy')
ans =
2013 2 3 0 0 0

Weitere Antworten (0)

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by