This is my code:
files = dir('*.xlsx');for i=1:10[~, ~, raw] = xlsread(files(i).name);rawm = raw(5:6,1);rawmd = cell2mat(rawm(1));rawmt = cell2mat(rawm(2));s = strcat(rawmd(31:40),rawmt(30:38));ds(i) = datetime(s)end
It produces a vector that looks like this:
ds'ans =10×1 datetime array14-Feb-2018 11:34:1615-Feb-2018 12:34:5815-Feb-2018 01:35:0415-Feb-2018 02:35:2615-Feb-2018 03:35:5215-Feb-2018 04:35:5915-Feb-2018 05:36:0515-Feb-2018 06:36:1415-Feb-2018 07:36:4115-Feb-2018 08:36:48
How can I change the format of the datetime array to military time so that the times may appear in chronological order?