Effacer les filtres
Effacer les filtres

Date time conversion 24

8 vues (au cours des 30 derniers jours)
Matlabbey
Matlabbey le 23 Nov 2013
Commenté : Jan le 23 Nov 2013
I have date in three column: HOUR;MINUTE;AM/PM
I have try modestly to convert this to military time (1:00 to 24:59) but the datenum/string do not work.
Is there a method to this?
  1 commentaire
Jan
Jan le 23 Nov 2013
What does "date in three column" exactly mean? Is this a string, a file, a cell string or a numerical array?

Connectez-vous pour commenter.

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 23 Nov 2013
d='01:30 PM'
new_d=datestr(datenum(d,'HH:MM AM'),'HH:MM')

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