Discussion Board for collaboration on QlikView Scripting.
Re: Help with Sql Where Date >
I have looked at the discussion above but I need help to do the following:
Below is the current script to get the dates I am interested in - however what I want is not to hard code the ScheduledDate. I would like to change ScheduledDate < '2017-09-01'
and make it ScheduledDate < today() + 30
Is this possible given that 'today() + 30' is is qlikview but it is part of an SQL select?
SQL SELECT *
where ScheduledDate >= '2016-01-01' and ScheduledDate < '2017-09-01'
drop table aaa;
Let vDate =Date(Floor(Today())+30,'YYYY-MM-DD');
View solution in original post
May be this
where ScheduledDate >= '2016-01-01' and ScheduledDate < (SYSDATE + 30);
Let vDate ='Date (Floor (Today ())+30),''YYYY-MM-DD'')'
In the sql where condition,
Let vDate ='Date(Floor(Today())+30),''YYYY-MM-DD'')';
on using debug this s gives vDate as :"Date(Floor(Today())+30),'YYYY-MM-DD')"
and causes a problem when trying to use it.
Let vDate =Date(Floor(Today())+30); this gives the vDate as 7/09/2017 but then the problem is that it is in the wrong format.
Thank you that worked! Where could I have found information about how to worked with dates as text???