Hello! i'm new here!
I dont know why my code dont work:
I'm triying to create multiple rows from a range of two dates.
Example:
Input Data:
->The date (Fecha_Inicio and Fecha_Termino) are in dd/mm/yyyy
Output Data:
What is wrong with my code? How Can I do that?
Thanks!
Greetings!
I dont know why my code dont work:
Code:
var fi = Fecha_Inicio;
while (fi<=Fecha_Termino)
{
newRow = createRowCopy(getOutputRowMeta().size());
var rowIndex = getInputRowMeta().size();
newRow[rowIndex++] = fi;
newRow[rowIndex++] = "N";
putRow(newRow);
dateAdd(fi,"d",1);
}
var Fecha = "";
var ignore = "Y";
Example:
Input Data:
ID | Fecha_Inicio | Fecha_Termino |
1 | 10/12/2013 | 12/12/2013 |
->The date (Fecha_Inicio and Fecha_Termino) are in dd/mm/yyyy
Output Data:
ID | Fecha_Inicio | Fecha_Termino | Fecha |
1 | 10/12/2013 | 12/12/2013 | 10/12/2013 |
1 | 10/12/2013 | 12/12/2013 | 11/12/2013 |
1 | 10/12/2013 | 12/12/2013 | 12/12/2013 |
What is wrong with my code? How Can I do that?
Thanks!
Greetings!