I'm importing data from a .csv file containing temperatures logged every 30 seconds for 4 days. There is a column containg timestamps but with no date information.
I would like to import this in matlab and add dates to the timestamps, I'm using 'datetime' to get it into the format I would like using;
conductor_temps=xlsread('1March19to5March19_data_set2.csv');TimeStamps = datetime(conductor_temps(:,2), 'ConvertFrom', 'excel');
This assigns 31-Dec-1899 to each timestamp due to the lack of date information. I can use;
TimeStamps.Day = 1;TimeStamps.Month = 3;TimeStamps.Year = 2019;
And manually assign. Is there a more elegant way to do this. For example assign a start date to the dataset and have it move to the following day each time the timestamps reaches midnight?
Best Answer