Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
quiero crear un rango de fecha que inicio el 01/01/2010 y el fin se la fecha actual quiero meter todos los dias de ese rango en un solo campo, por favor algo mas simple de entender gracias
load this code in application
set vMindate='01/01/2010';
set vMaxdate=date(today());
tempCal:
Load
$(vMindate)+iterno()-1 as tempdate,
date($(vMindate)+iterno()-1) as Date,
Monthname($(vMindate)+iterno()-1) as MonthYear
autogenerate 1 while $(vMindate)+iterno()-1<=$(vMaxdate);
and then take Date and see
is this what you required
hope this helps
load this code in application
set vMindate='01/01/2010';
set vMaxdate=date(today());
tempCal:
Load
$(vMindate)+iterno()-1 as tempdate,
date($(vMindate)+iterno()-1) as Date,
Monthname($(vMindate)+iterno()-1) as MonthYear
autogenerate 1 while $(vMindate)+iterno()-1<=$(vMaxdate);
and then take Date and see
is this what you required
hope this helps
como funciona y que hace ese autogenerate 1 ?
I have a friend problem I do what I explicastes but in my field only leaves a date of '29 / 12/1899 'I do not get the date range
it will start from
01/01/2010 and iterate till today
autogenrate 1 mean it will genrate 1 value for each iteration
and it will iterate till less than or equal to maxdate i.e today.
hope this helps
thank you friend
Estimado,
Aségurate que el formato de tu fecha sea el mismo que el declarado en la variable.
Yo le agregué el valor 42189 para que comenzara en el 01-01-2010 y no en el 1894...
Al menos así me funcionó a mí.... la función autogenerate junto con la while son para iterar n veces hasta que se cumpla la condición... sólo le suma 1 día (iterno()) a la fecha por cada iteración para que genere todos los rangos de fechas que necesitas. En este caso desde el 01-01-2010 a la fecha actual.
Prueba y me cuentas si no te funciona.
SET DateFormat='DD-MM-YYYY';
set vMindate='01-01-2010';
set vMaxdate=date(today());
tempCal:
Load
$(vMindate)+42189+iterno()-1 as tempdate,
date($(vMindate)+42189+iterno()-1) as Date,
Monthname($(vMindate)+42189+iterno()-1) as MonthYear
autogenerate 1 while $(vMindate)+42189+iterno()-1<=$(vMaxdate);
gracias por apoyarme pero tamibne vi eso y puse esto y funciono correcto muchas gracais
set vMindate= ('2010-01-01');