This question is closed. Reopen it to edit or answer.
I have a text file contain the date and time like this 20180405125901 (2018-April-05 12:59:01), can matlab load the file and convert it to datetime like this 05-Apr-2018 12:59:01
1 view (last 30 days)
Elias Gule on 5 Apr 2018
str = '20180405125901';
t = datetime(str,'InputFormat','yyyyMMddhhmmss')
Peter Perkins on 6 Apr 2018
If this is a CSV or similar, it's also possible to use readtable and read them in directly as datetimes. Specify the datetime format as Elias suggests. Depending on what version of MATLAB you have, detectimportoptions might also be useful.