Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have this logreader that I downlaoded from the resource library. how can I make it so that it only loads last weeks data instead of reading everything in the logfile driectory?
cheers
I'm sure you could dabble in the script, but I seem to think there are selection criteria in the front-end to filter the period you look at ?
Yes sure theres a period to filter on. But I'm not interested in logfiles from wayback and also it just consumes time to load them all. Therefor I was wondering if you could set a where statement in scipt to only get the last weeks logfiles or so,,,
Try like this
LET vMaxDate: '=max(date_created)';
LET vFirstOfLast7: '=max(date_created,6)';
LOAD *
from table_name
where date>vFirstOfLast7;
Could you specify more? My Datecolumn is called "Date"
Could this work?
LET FromDate = Today()-7;
LET ToDate = Today()-1;
Directory;
LOAD Date,
Num
FROM
TableIndata.txt
(txt, codepage is 1252, embedded labels, delimiter is ',', msq)
WHERE Date >= $(FromDate) AND Date <= $(ToDate);
You can manipulate FromDate and ToDate as you like, in this case today's entries would not be included (which may not be what you want but I just wanted to include both conditions).
could you please share the sample data ..so that it will helpful to give the correct solution