Sorting data from time stamp in excel

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.

回答 (1 件)

dpb
dpb 2014 年 7 月 1 日

0 投票

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.

カテゴリ

ヘルプ センター および File ExchangeData Import from MATLAB についてさらに検索

質問済み:

2014 年 7 月 1 日

回答済み:

dpb
2014 年 7 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by