%% Convert Excel Serial Date Numbers to MATLAB Dates
% Given Excel® date numbers in the 1904 system, convert them to MATLAB® serial date numbers, and then to date character vectors.

ExDates = [35423  35788  36153];
MATLABDate = x2mdate(ExDates, 1)
datestr(MATLABDate)

%
% Alternatively, use the optional input outputType to specify 'datetime' to return datetime format.

ExDates = [35423  35788  36153];
MATLABDate = x2mdate(ExDates, 1,'datetime')

% Copyright 2012 The MathWorks, Inc.