Borrar filtros
Borrar filtros

create date from three column vectors

1 visualización (últimos 30 días)
Vanessa
Vanessa el 24 de Abr. de 2018
Comentada: Stephen23 el 24 de Abr. de 2018
Hello everyone,
I have three column vectors. The first one is the number of the day (double vector), the second one is the name of the month(cell vector eg. March) and the third one is the year (double vector).
How can I create a date combining these three vectors in format 2018-03-01?
Thank you Vanessa

Respuestas (1)

Aletta Wilbrink
Aletta Wilbrink el 24 de Abr. de 2018
Editada: Aletta Wilbrink el 24 de Abr. de 2018
Is this wat you want?
m = datevec(month,'mmmm');
d = datetime(year,m(2),day);
  2 comentarios
Vanessa
Vanessa el 24 de Abr. de 2018
Thank you!!
Stephen23
Stephen23 el 24 de Abr. de 2018

This might be useful:

m(:,2)

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by