datestr not working properly

Can someone explain this?
>> raw(3)
ans =
'22/07/2012 18:26:17'
>> datestr(raw(3), 'yyyy-mm-dd HH:MM:SS')
ans =
0028-01-02 18:26:17
It was working before, not sure why its messing up the date but not the time
Thanks,

댓글 수: 1

I tried this as well same problem:
>> datestr('22/07/2012 18:26:17', 'yyyy-mm-dd HH:MM:SS')
ans =
0028-01-02 18:26:17

댓글을 달려면 로그인하십시오.

 채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 8월 1일

0 개 추천

datestr(datenum(raw,'dd/mm/yyyy HH:MM:SS'), 'yyyy-mm-dd HH:MM:SS')

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Time Series Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by