Hi everyone,
I have a very big table called "export" (more than 2000000 rows) with a column of dates called "expiration" and I have this part of code:
for i 1:size(export,1)
if weekday(export.Expiration(i,1))==7
export.Expiration(i,1) = cellstr(datetime(datenum(export.Expiration(i,1))-1,'ConvertFrom','datenum','Format','MM/dd/yyyy'));
end
end
My problem is that the loop for is very slow. Anyone knows how to avoid the loop for to get the same result? thanks a lot!!
I have a very big table called "export" (more than 2000000 rows) with a column of dates called "expiration" and I have this part of code:
for i 1:size(export,1)
if weekday(export.Expiration(i,1))==7
export.Expiration(i,1) = cellstr(datetime(datenum(export.Expiration(i,1))-1,'ConvertFrom','datenum','Format','MM/dd/yyyy'));
end
end
My problem is that the loop for is very slow. Anyone knows how to avoid the loop for to get the same result? thanks a lot!!