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 Ansicht (letzte 30 Tage)
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"

Antworten (1)

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

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by