Transforming Timestamps column into various columns

1 vue (au cours des 30 derniers jours)
João
João le 26 Nov 2013
Commenté : João le 6 Déc 2013
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.

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 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);
  1 commentaire
João
João le 6 Déc 2013
Thx, that's exactly what I was looking for.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by