%% Convert Date String to Date Vector Using Pivot Year
% Convert text representing a date to a date vector using the default pivot year.

DateString = '12-jun-17';
formatIn = 'dd-mmm-yy';
DateVector = datevec(DateString,formatIn)

%
% Convert the same date to a date vector using 1800 as the pivot year.

DateVector = datevec(DateString,formatIn,1800)

% Copyright 2012 The MathWorks, Inc.