%% Calculate Elapsed Times Since Midnight
% Create a datetime array.

DT = datetime('now') + hours(1:3)

%
% Calculate the elapsed time since midnight for each input value. Display the times as hours, minutes, and seconds.

T = timeofday(DT)

% Copyright 2015-2021 The MathWorks, Inc.