Beginning in MATLAB R2018a, you can create durations from text using the duration function and import functions. The text2duration function is intended to provide similar functionality for earlier releases. It may also be used to convert text timestamps in some formats not recognized by the duration function.
Heather Gorr (2020). text2duration (https://www.mathworks.com/matlabcentral/fileexchange/66940-text2duration), MATLAB Central File Exchange. Retrieved .