%% Convert Datetime Array to Excel Date Numbers
% Create a datetime array. Then, convert the dates to the equivalent Excel® serial date numbers.

t = datetime('now') + calmonths(1:3)

%

e = exceltime(t)

% Copyright 2015 The MathWorks, Inc.