Borrar filtros
Borrar filtros

Date time conversion 24

8 visualizaciones (últimos 30 días)
Matlabbey
Matlabbey el 23 de Nov. de 2013
Comentada: Jan el 23 de Nov. de 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 comentario
Jan
Jan el 23 de Nov. de 2013
What does "date in three column" exactly mean? Is this a string, a file, a cell string or a numerical array?

Iniciar sesión para comentar.

Respuestas (1)

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

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by