MATLAB: Change imported date into datetime format

excel datetime format

Hi,
I have a cell array with many dates that were imported from an excel file.
Each cell array entry looks like this ie. 08/21/2020 (Aug).
I want to change the above format into a datetime format.

Best Answer

Try this:
de = '08/21/2020 (Aug)';
DT = datetime(de, 'InputFormat','MM/dd/yyyy (MMM)')
producing (using the default Format):
DT =
datetime
21-Aug-2020
.