MATLAB: How to convert character data to double

arraydouble

Hi all,
i have a char array that has these values below, which i want to get a bouble array of it.
01/04/2016
02/04/2016
03/04/2016
04/04/2016
.... %etc until
20/05/2016
Any help would be appreciated.
Thanks

Best Answer

Use
datenum() or datetime()
Example:
DateString = ['01/04/2016';'02/04/2016';'03/04/2016';'04/04/2016';'20/05/2016'];
formatIn = 'mm/dd/yyyy';
datenum(DateString,formatIn)
datetime(DateString)
Use datetime as suggested by sir Walter