%% Convert MATLAB Serial Date Numbers Using 1900 Date System With a datetime Array
% This example shows how to convert MATLAB® date numbers using a datetime array with the 1900 date system. Given MATLAB date numbers for Christmas 2001 through 2004, convert them to Excel date numbers in the 1904 system.

DateNum = datetime(2001:2004, 12, 25,'Locale','en_US');
ExDate = m2xdate(DateNum)

% Copyright 2012 The MathWorks, Inc.