datestr problem with month
Ältere Kommentare anzeigen
I have a variable T.Date with 5173x 1 datetime, '04/04/2018' '05/04/2018' etc...
when i use the code
Date= datestr(T.Date,'dd/MM/yyyy');
or
formatOut = 'dd/MM/yyyy'
Date= datestr(T.Date, formatOut)
I get 5173 x 10 char '04/00/2018' and so on for all the dates. The month is 00 for every output.
why is this happening and what can I do to fix this?
1 Kommentar
Akzeptierte Antwort
Weitere Antworten (1)
madhan ravi
am 20 Nov. 2018
Use datetime
str='04/04/2018'
Date= datetime(str,'format','dd/MM/yyyy')
Kategorien
Mehr zu Dates and Time finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!