Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have source data which is like
MAY-2018,1,2,3,4
APR-2018,1,2,3,4
DEC-2017,1,2,3,4
If current month is JULY-2018 then I want to avoid loading data older than 6+1 month hence in the loading I want to avoid loading DEC-2017 entry.
thanks,
Where Date#(Date,'MMM-YYYY') >= AddMonths(Today(),-7);
hello
try something like
let a=date(today(),'MMM-YYYY');
let b=date(addmonths(a,-6),'MMM-YYYY');
and in you load, add a where clause
DateLoad>=b;
Hi, Does it not require to convert the first column to the date format? Because I already tried the above method but it is loading 0 rows i.e. nothing.
I did try something like below in the where clause but it didn't work.
Where Date(MONTH&'-'&YEAR,'MMM-YYYY') >= date(AddMonths(Today(), -7),'MMM-YYYY');
Try with :
Where Date(Date#(MONTH&'-'&YEAR,'MMM-YYYY')) >= AddMonths(Today(),-7) ;
Where Date#(Date,'MMM-YYYY') >= AddMonths(Today(),-7);
both solutions are working.