Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlikview community,
I have to extract data from oracle database tables which have date as a field.
I want to extract data between a start date and an end date.
Do you know how to implement that in Qlikview?
Thank you in advance,
Hi,
do you mean you want to get the difference between two Date values ?
example:
Date1: 01/01/2018
Date2: 30/01/2018
difference = 29 days
Hi, try this
Where
date >= '2018/01/01' AND date<= '2018/09/12';
Best Reguards
Depends on scenario if you want to select data between 2 dates create slider/calendar objects attached to from and to variables utilize these depending on scenario
1)with triggers to make the master calendar selections
2) or use in set analysis count({<Date={'>=$(vStartDate)<=$(vEndDate)'}>} distinct Customer)
below video is useful
Selecting Arbitrary Date Ranges - YouTube
if as youssef asked difference between 2 date values thats a different scenario
may be you want to try like in your SQL Script:
SQL
SELECT yourfieldlist, Field2, Field3, DateField....
FROM yoursourcetable a,
(Select Min(DateField) AS MinDate, Max(DateField) AS MaxDate
FROM yoursourcetable)b
WHERE a.DateField between MinDate and MaxDate;
Hi Dilip,
Thank you very much I think the second option is the answer to what I want to do.
I will check that on Qlikview and let you know.
Best regards
Hi Vishwarath,
Thank you for the solution, I will try it and let you know.
Kind regards
Hi Dilip, Hi Vishwarath,
I created two fields startdate and enddate and two selections lists.
When I select the startdate the enddate is locked and in a cross table I put this expression:
count ({Date={'>=$(STARTDATE)<=$(ENDDATE)'}>} distinct QTEPROD but it didn't work.
STARTDATE and ENDDATE are to fields of a master calendar.
Thank you in advance,
Abdallah