Sorting data from time stamp in excel

10 visualizzazioni (ultimi 30 giorni)
Terez
Terez il 1 Lug 2014
Risposto: dpb il 1 Lug 2014
I have data in excel that has two columns and 3,000 rows. The first column is date and time in the format month/date/year hour:minute:secondAM/PM. I'm trying to load this data into matlab and put the year, month, date and time in separate columns so I end up with five columns.
I can use the load function to get the excel data into matlab but I'm not sure how to separate the time stamp data into different columns.

Risposte (1)

dpb
dpb il 1 Lug 2014
Why do you need separate columns--what are you going to do with them?
If you think you must, use datevec to parse the string format.
doc datevec
doc datenum
Read the section under data import/spreadsheets on converting Excel date values for background working with Excel dates other than text.

Categorie

Scopri di più su Data Import from MATLAB 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!

Translated by