Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current Date

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?

4 Replies
Andrea_Ghirardello

you can put the date into a variable:

Let yourVariable = Date(Today() -1);

MayilVahanan

Hi

Yes it's possible

Try like this

Load * where datefield <= Date(today()-1);

Select * from tablename;

Note:

both datefields are in same format

Thanks & Regards,
Mayil Vahanan R
swuehl
MVP
MVP

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)';

Not applicable
Author

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)