Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this field in my load from SQL
[CompletionDate]
An example of how qlikview displays the date is 18/08/2016 13:47:00
I need to bring in data with anything after 31/07/2016.
How can I acheive this in my load ?
Thanks
May be like this:
LET vCondition = Chr(39) &Date(MakeDate(2016, 7, 31), 'DD-MMM-YYYY') & Chr(39);
SELECT ....
FROM ....
WHERE CompletionDate > $(vCondition);
May be like this:
LET vCondition = Chr(39) &Date(MakeDate(2016, 7, 31), 'DD-MMM-YYYY') & Chr(39);
SELECT ....
FROM ....
WHERE CompletionDate > $(vCondition);
May be as below:
Where Date(Floor(CompletionDate),'DD/MM/YYYY') > '31/07/2016'
Have a look here: Get the Dates Right and here: Preceding Load.
- Marcus
Thanks Thirumala
but I get...........
ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: 'Date' is not a recognized built-in function name.
Is it possible to post the code ? You should not apply that on the SQL query. You need to apply on the Qlikview code. For example:
Data:
Load * Inline [
ID,Start,Amount
100,31/08/2016,1000
200,20/08/2016,2000
300,21/08/2016,3000
];
NoConcatenate
Final:
Load *
Resident Data
Where Date(Floor(Start),'DD/MM/YYYY') > '20/08/2016';
Drop Table Data;
Thank you