%% Convert Duration Array
% Convert from a duration array to string. For more information related to converting from common data types to string see Convert Between Datetime Arrays, Numbers, and Text
% Create a duration array.

D = hours(23:25) + minutes(8) + seconds(1.2345)

%
% Convert D to a string array.

str = string(D)

% str is a string array with one duration value per element. str is the same size as D.
%
% Specify the format of the duration values in str.

str = string(D,'hh:mm')

% Copyright 2012 The MathWorks, Inc.