%% Convert datetime Array to Date Numbers

format long 

t = [datetime('now');datetime('tomorrow')]
DateNumber = datenum(t)

% Copyright 2015 The MathWorks, Inc.