%% Difference Between Datetime Values in Calendar Days
% Create a sequence of datetimes over a 6-month period. Then, find the number of days between the first date and each of the dates in the sequence.

t1 = datetime(2013,1,1);
t2 = dateshift(t1,'end','month',0:4)

%

dt = between(t1,t2,'Days')

% Copyright 2015 The MathWorks, Inc.