transforming mm():mm() to 'yyyy/mm'

1 visualización (últimos 30 días)
Shiina Sponge
Shiina Sponge el 23 de Mayo de 2020
Respondida: Walter Roberson el 23 de Mayo de 2020
date = mm(2020,1):mm(2020,3);
ans = 24240e+04 24241e+04 24242e+04
how to transform date to '2020/01','2020/02','2020/03'?
I used formatOut = 'yyyy/mm';d = datestr(date,formatOut); but it didn't work.

Respuestas (1)

Walter Roberson
Walter Roberson el 23 de Mayo de 2020
datetime(date,'convertfrom', 'excel', 'format', 'yyyy-MM')

Categorías

Más información sobre Time Series Objects 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