MATLAB: Datestr not working properly

datestrincorrect date

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,

Best Answer

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