Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I would like to load a script. It connects to a DB and there i would like to load the data.
Is it possible to get the day yesterday and put it into where?
you can put the date into a variable:
Let yourVariable = Date(Today() -1);
Hi
Yes it's possible
Try like this
Load * where datefield <= Date(today()-1);
Select * from tablename;
Note:
both datefields are in same format
Maybe like this:
Let vYesterday = date(today()-1,'YYYY-MM-DD'); // should match the format of your DB
SELECT DATE FROM DB WHERE DATE = '$(vYesterday)';
Like this in your edit script:
Let vDateToday = date(Today()-1);
Otherwise you could go to settings - > Variable overview -> add new and type date(today()-1)
You could also use this in your where statement from SQL
Where cast(date as date) = cast(getdate()-1 as date)