Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
- Before going to my content can you please see my qvw file. I've a 3 fields in my qvd one of the field is CaptureDateTime.
- You can see two text objects in sheet i want to retrive the data of captureDateTime between the data of text object.
- The CaptureDateTime is in timestamp format. While loading the qvw file i want to retrive the data based on condtion for qvd file i.e between those dates only.
- I stored those data in variable.
For your reference i'm attaching qvd file also.
Hi, try this to filter
WHERE
CaptureDateTime >= Date#('$(vStartDate)' & ' ' & '$(vStartTime)', 'MM-DD-YYYY hh:mm:ss')
AND CaptureDateTime <= Date#('$(vEndDate)' & ' ' & '$(vEndTime)', 'MM-DD-YYYY hh:mm:ss');
Hi, try this to filter
WHERE
CaptureDateTime >= Date#('$(vStartDate)' & ' ' & '$(vStartTime)', 'MM-DD-YYYY hh:mm:ss')
AND CaptureDateTime <= Date#('$(vEndDate)' & ' ' & '$(vEndTime)', 'MM-DD-YYYY hh:mm:ss');
Thanks a lot Edurdo..
- If i want to retrive last 30 days. If the below code is correct. or not.
Where CaptureDateTime > AddMonths('$(vMaxCaptureDateTime)',-1);
The variable vMaxCaptureDateTime holds the DateTimeStamp of highest date of qvd file.
Hi, this filter works too
Eduardo,
Thanks a lot for your help. But few months contains 31 days also at that time the above filter works exactly or not. B'coz i want to retrive exactly last 30 days data only. Sorry to ask you without testing on this b'coz right now i don't have qlikview s/w to test. I'm on leave today.....
Bye Buddy.................
Hi, if just 30 days you can do this:
Where CaptureDateTime > DATE('$(vMaxCaptureDateTime)' - 30, 'DD/MM/YYYY') ;
Edurado,
Actually this is best filter to apply. I'll try with this filter when i start my work..
Thanks a lot once again.
Hi Eduardo,
I need small help from you again. I'm storing all captureDateTime field data of in one variable(i.e vTotalDates=07-01-2011,07-02-2011,07-03-2011,07-05-2011,07-06-2011,07-07-2011,07-08-2011,07-09-2011,07-10-2011). While loading the qvd file i'm writing where condition like this.
where Match(CaptureDateTime,'$(vTotalDates)');
But it is not working .....Can you help me in this plz
Hi
I think that you want to simulate a SQL Function " IN ".
Try this:
WHERE IF('$(vTotalDates)' LIKE '*' & DATE(CaptureDateTime, 'MM-DD-YYYY hh:mm:ss') &'*', 1, 0)