MATLAB: Converting to different date format

convertdateformat

Hi,
I would like to convert this date:
2012-09-01
to
2012-9-1
How can I do this?
Thanks,

Best Answer

try use
regexprep('2012-09-01','-0','-')