converting date and time ind text format to a number

4 Ansichten (letzte 30 Tage)
Adam
Adam am 5 Aug. 2011
I currently have a lot of measurements data, which has been logged in a .csv file with date and time ind the format: "dd/mm/yyyy hh:mm:ss". I want to sort the data by date and time, and therefore i would like to store the date/time in a variable like A = [date,time] in the format date = ddmmyyyy and time = hhmmss. The date/time data is currently stored in a very large collum vector in a string format!
How can i do that?
  1 Kommentar
Jan
Jan am 5 Aug. 2011
How are the date strings separated in the "very large column vector"? Please post an example.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Daniel Shub
Daniel Shub am 5 Aug. 2011
doc datenum
doc datestr

Weitere Antworten (1)

Jan
Jan am 5 Aug. 2011
For sorting the serial date number is more efficient: see DATENUM.

Kategorien

Mehr zu Dates and Time 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