MATLAB: Date computations in a table date I have a table LC that has a column of dates called "date". The date format is however 19850331. I want to extract the year and the month of this date. How can I do so? Best Answer LC.date = datetime(sprintfc('%d',LC.date),'InputFormat','yyyyMMdd');LC.month_year = [month(LC.date),year(LC.date)] Related SolutionsMATLAB: Convert date to datetime t = datetime(DateStrings,'InputFormat','dd/MM/yyyy'); MATLAB: Computations http://www.mathworks.com/moler/chapters.html Related QuestionProduce a Date vector starting with a desired dateSymbolic computationHow to get datetime with the “Epoch” key to millisecond resolutionComputational problem!!!Please help!!!! Write a function that returns the number of days between dates
Best Answer