Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the next situation
LET vDate = Today();
//Obtener hasta que fecha actualizar el histórico
IF Day($(vDate)) = 24 THEN
...
ELSE
...
ENDIF
Today is 24 but when i run the script runs "else" expression.
In text object shows the value such as
Day($(vDate)) = 30
Day(vDate) = 24
Why ??
Thanks!
Hi,
vDateUpdate is a literal, so you need to use single quotes to match the format returned by the Date() function:
Where Date(fecha_factura) <= '$(vDateUpdate)';
Hope that helps.
Miguel
If you create a variable in variable overview you need to use "$" in order to evaluate the expression.
If you are trying to get the value using script you don't have to use $.
Hi,
Why not use the Day() function in the LET variable assignment?
LET vDate = Day(Today());
Hope that helps.
Miguel
Now i have the code in this way
LET vDate = Today(); //Fecha actual
LET vDay = Day(Today()); //Día actual
//Obtener hasta que fecha actualizar el histórico
IF $(vDay) = 24 THEN
LET vDateUpdate = MonthEnd(AddMonths(Today(),-2)); //Fecha hasta donde cargar el historial
LET vDateNewUpdate = MonthStart(AddMonths(Today(),-1)); //Fecha desde donde se hace la nueva carga
ELSE
LET vDateUpdate = MonthEnd(Addmonths(Today(),-1)); //Fecha hasta donde cargar el historial
LET vDateNewUpdate = MonthStart(AddMonths(Today(),0)); //Fecha desde donde se hace la nueva carga
ENDIF
A03:
LOAD *
FROM
[..\FACTURACION_DETALLADA_CON_PAQUETE_EXT.qvd] (qvd)
Where Date(fecha_factura) <= $(vDateUpdate);
The first part works fine, but now when i load the QVD to compare with the date the result is empty.
Any suggestion.
Thanks!
Hi,
vDateUpdate is a literal, so you need to use single quotes to match the format returned by the Date() function:
Where Date(fecha_factura) <= '$(vDateUpdate)';
Hope that helps.
Miguel
Thanks! Miguel Angel