Discussion Board for collaboration on QlikView Scripting.
We are facing recent date change and filter problem in one of our report.
the back ground of issue is give bleow:
in datasource date is like : [created date] 2016-03-29 22:35:19
we are converting that date in QVD load stage like Date ([created date].'DD/MM/YYYY')
finally we want to filter the data in qvw layer by using variable :
WHERE Date([created date],'DD/MM/YYYY') = '$(vstartdate)'
BUT WE ARE not getting any out ....am i doing somethine wrong.....
try to create date lik below
Date(Date#([created date] ,'YYYY-MM-DD mm:ss:hh'),'DD/MM/YYYY') as NewDate
Couple of things here....
1) If you don't need the time portion of the created date, remove it. Just because you have formatted it as Date(), doesn't mean the time portion is removed, use Floor() to remove it.
Date(Floor([created date]), 'DD/MM/YYYY') as [created date]
2) Try using it like this:
vstartdate = Num(Today() -20);
Where [created date] = $(vstartdate)
But your existing should also work, but I prefer using Num(), instead of date in where clause.