Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data set from 2006-2016 with the last date being 6/23/2016. I would like to use a variable to load a specific range from 2/15/2010 to the most current date 6/23/2016. I started by creating a start and end date by typing,
vStartDate = Date('2/15/2010')
vEndDate = Date('6/23'2016')
For this specific set I am looking to only load data between these dates. The Dateformat is set to "M/D/YYYY" if that helps at all. Any guidance where to start would be much appreciated.
Jen.
typo in End Date?
vEndDate = Date('6/23'2016')
vEndDate = Date('6/23/2016')
If my code, I also use LET with the assignment.
Make sure whereever your using the value understands it as a date as well, Qlik may return a string or a number; you may have to format:
Qlik qvd:
START_TIME >= Date('$(Start_Date)')
oracle:
TIME >= to_Date('$(Start_Date)','M/D/YYYY')
Bonjour,
Use Makedate
LET vStartDate = Num(Makedate(2010,2,15)); //MinDate as the 15 feb 2010
LET vEndDate = Num(Makedate(2016,6,23));//MaxDate as the 23 jun 2016
Test in text box
='MinDate :' &' '& Date($(vMinDate),'DD/MM/YYYY')
='MaxDate : &' '& Date($(vMaxDate),'DD/MM/YYYY')
Have a good day
J-B
Sorry
For the test replace with : vMinDate and vMaxDate by vStartDate and vEndDate.
MinDate as StartDate; MaxDate as EndDate
J-B
Let vStartDate = Date(Date#('2/15/2010','M/DD/YYYY'),'M/DD/YYYY');
Let vEndDate = Date(Date#('6/23/2016','M/DD/YYYY'),'M/DD/YYYY');