Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How does one only extract information from 2015 in from script tables in QVD?
The tables have information from many years ago and if I can only include 2015YTD worth of information that would be ideal.
The table names are Activity.DueDate, Activity.PlannedDate and Activity.CreatedDate and Im thinking its something like the image I have posted below but it does not seem to work correctly. Any advise is greatly appreciated. Many thanks.
Yes, but it looks a little different:
WHERE InYear(fieldname, today(),0)
where year(urdatefield)=year(today());
This could be a potential issue at the beginning of next year. Let say if the application is reloaded on Jan 1st 2016 and there is no data point for 2016 available then the application won't reload. Would this be a possibility?
Where Year(DateField) = if(Month(Today()) = 'Jan' and Day(Today()) = 1, Year(today()) - 1, Year(Today())); (Updated)
This could be further configured based on when the 2016 data needs to be included and 2015 to be excluded.
I have never used if with where before, so not 100% sure if this is going to work or not. But def. worth giving a shot.
HTH
Best,
Sunny
ur absolute right,but the subject line says looking only for 2015;
Hahahaha that's true. then why not just do like this:
Where Year(DateField) = 2015; (Why check against Year(Today())?)
Thanks for the responses. Would InYear(fieldname) work also?
Hi Stephen,
According to this, it should work (Extract from QlikView help)
Yes, but it looks a little different:
WHERE InYear(fieldname, today(),0)
good counter ..like it.