MATLAB: How to change unique format in the date field

datedd/mm/yyyyformat

a={'05-03-13','10-12-13','04-03-14','16/07/2014','08-07-13','28/11/2013','12-06-12','02-03-12','19/04/2013'}
they have mixed format of date dd-mm-yyyy and dd/mm/yyyy so, how to change all dates are given dd/mm/yyyy format
Ex:
input: a= '01/12/2002', '5/4/2001', '06-05-1999', '7-6-2012'
desired output x= '01/12/2012', '05/04/2001', '06/05/1999', '07/06/2012'

Best Answer

cellstr(datestr(a,'dd-mm-yyyy'))';