%% Find Second Number of Datetime Values

t1 = datetime('now','Format','dd-MMM-yyyy HH:mm:ss.SSS');
t = t1 + seconds(30:15:60)

%

s = second(t)

% Copyright 2015 The MathWorks, Inc.