Azzera filtri
Azzera filtri

Transforming Timestamps column into various columns

1 visualizzazione (ultimi 30 giorni)
Hi all,
I'm with a problem and can't find the solution for it, hope you can help me.
I have this column;
Timestamps
01/01/2012 09:00
01/01/2012 10:00
01/01/2012 11:00
and now I want to slip it into 4 different columns with:
Day Month Year Hour
01 01 2012 9
The file is in excel.
Thanks.

Risposta accettata

Andrei Bobrov
Andrei Bobrov il 26 Nov 2013
data = {'01/01/2012 09:00'
'01/01/2012 10:00'
'01/01/2012 11:00'};
v = datevec(data);
out = v(:,1:4);

Più risposte (0)

Categorie

Scopri di più su Dates and Time 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