Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i've a field Date time formatted as 01/04/2018, in script i've to set 6 years previous data load not from today but from the last data reload that is max(datetime). My calendar should be expressed in as Monthname (04/2018). I'm not able to translate in script, can you help me?
Hi,
try this:
Max:
Load
Max(D_FINE_VAL) as MaxDate
Resident your_table;
Let vMax = FieldValue('MaxDate',1);
Drop Table Max;
your_table:
LOAD
.
Date(Date#(Date,'DD/MM/YYYY'),'MM/YYYY') as Date,
.
.
FROM...
WHERE Date>addyears($(vMax),-6);
Try something like this:
Let vLastReload = Date(floor(ReloadTime()));
Load *
From X
Where yourDate >= Addmonths('$(vLastReload)',-72);
Hi,
try this:
Max:
Load
Max(D_FINE_VAL) as MaxDate
Resident your_table;
Let vMax = FieldValue('MaxDate',1);
Drop Table Max;
your_table:
LOAD
.
Date(Date#(Date,'DD/MM/YYYY'),'MM/YYYY') as Date,
.
.
FROM...
WHERE Date>addyears($(vMax),-6);
Tks
you're welcome good luck