to datetime matlab code example Example: matlab convert datenum to datetime t = datetime(X,'ConvertFrom','datenum')