Exracting n characters from all elements of cell array
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
jnaumann
le 22 Déc 2014
Réponse apportée : Azzi Abdelmalek
le 22 Déc 2014
Hi,
I have some data in the following form and would like to extract separate the date and time components, therefore creating two arrays; the first using characters 1:10 and the second characters 12:19.
date_time =
'01/01/2011 19:47:43'
'01/01/2011 19:47:43'
'01/01/2011 21:43:25'
'01/01/2011 21:07:19'
I'm sure its a trivial problem but I can't quite do it
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 22 Déc 2014
date1=datestr(date_time,'dd/mm/yyyy')
hour1=datestr(date_time,'HH:MM:SS')
0 commentaires
Plus de réponses (0)
Voir également
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!