%% Convert Datetime Array to YYYYMMDD Numeric Values
% Create an array of YYYYMMDD numeric values that represent dates.

d = [20140628 20140701 20140704]

%
% Convert the dates to datetime values.

t = datetime(d,'ConvertFrom','yyyymmdd')

%
% Convert the datetime values back to YYYYMMDD numeric values.

d2 = yyyymmdd(t)

% Copyright 2015 The MathWorks, Inc.