MATLAB: How to get difference between two time values

time difference

How we will get difference between the below times. I tried with caldiff, diff, substraction commands its not working . Please help me if any one knows
Capture2.JPG

Best Answer

You can use etime, but you need to convert your strings first. I hope this helps:
a=datetime
pause(5)
b=datetime
a=datevec(a);
b=datevec(b);
etime(b,a)