I have a datetime '06-Sep-2012 09:29:00' or datenum "7.3387e+05", how do I write to a text file as follow "20120906 092900"

1 visualización (últimos 30 días)
I have a datetime '06-Sep-2012 09:29:00' or datenum "7.3387e+05", how do I write to a text file as follow "20120906 092900"

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 6 de Abr. de 2018
a=datetime('06-Sep-2012 09:29:00');
b=datestr(a,'YYYYMMDD HHmmss')

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