I did find a way to do it. I will post my code hope it helps someone who gets stuck with similar issue. I know its not very efficient but it works. Please I am open to any suggestion feel free to comment any changes you feel to be made to the code.
% to get box plot based on time series data
mydate=cellfun(@(x) x(1:end-9),DateTime,'un',0);
temp=table(UnitName,mydate,TotalData,Software,abs_time);
temp=sortrows(temp,5);
mydata=table2cell(temp);
mydate=mydata(:,2);
uniquedate=unique(mydate);
[~,start_idx]=ismember(uniquedate,mydate);
end_idx=ones(length(start_idx),1);
for i =1:length(start_idx)
if i==length(start_idx)
end_idx(i,1)=length(mydate);
else
end_idx(i,1)=start_idx(i+1)-1;
end
end
for i=1:length(uniquedate)
day_number=day(uniquedate(i));
[~,month_name]=month(uniquedate(i));
eval(sprintf('%s%d=TotalData(start_idx(i):end_idx(i));',month_name,day_number));
days{i,1}=sprintf('%s%d',month_name,day_number);
end
month_name={'Jan';'Feb';'Mar';'Apr';'May';'Jun';'Jul';'Aug';'Sep';'Oct';'Nov';'Dec'};
Box1={};
BoxFinal1={};
for ii=1:length(month_name)
possiblevars=who('-regexp',month_name{ii});
currentvars=possiblevars;
for iii=1:length(currentvars)
Box=eval(currentvars{iii});
Box1=[Box1;Box];
BoxFinal=iii*ones(size(eval(currentvars{iii})));
BoxFinal1=[BoxFinal1;BoxFinal];
end
Box1=vertcat(Box1{:});
BoxFinal1=vertcat(BoxFinal1{:});
Figure1=figure;
boxplot(Box1,BoxFinal1);
grid on
set(gca,'XTick',1:1:31,'fontsize',10)
set(gca,'XTickLabel',currentvars)
xlabel('Dates')
Box1={};
BoxFinal1={};
end