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 vue (au cours des 30 derniers jours)
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"

Réponses (1)

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

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