Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I add the number of days to a certain date that is present in a table and when I find it I set it to 0 and so on?
on this code what's wrong?
let vDiaAcidente = 0;
let vDateYearStart = YearStart(Today());
let vDateYearEnd = Today();
let numeroInicio = Num(Date#(vDateYearStart, 'DD/MM/YYYY')); //dia para numero
let numeroFim = Num(Date#(vDateYearEnd, 'DD/MM/YYYY')); //dia para numero
let nRows = NoOfRows('Controlo') - 4;
trace $(vDateYearStart) - $(vDateYearEnd)
$(numeroInicio) - $(numeroFim);
For i = numeroInicio to numeroFim
for j = 0 to $(nRows)
let vData = Peek('Data',$(j));
// Trace $(vData);
If (i) = vData then
vDiaAcidente = 0;
Else
vDiaAcidente = vDiaAcidente + 1;
end if
// trace $(vDiaAcidentes);
next i;
next j;
not entirely clear what you are trying to do. but i do see the for loops ended wrongly
you have mentioned 'next i' before 'next j' should be other way around