Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I use Qlikview 7.
The makewekdate function
date(makeweekdate(year('2010-01-03'),Week('2010-01-03')),'YYYY-MM-DD')
gives 2011-01-03 instead fo 2009-12-28. i.e one year ahead. or am i making a big blunder?
Thanks,
Mmahan
When you get unexpected results, you can break the problem into pieces and interpret what you see:
Are you actually trying to accomplish something with this expression, or just fiddling with date functions?
Thanks for the explanation. Actually I am making a time dimension link with actual values from the DB date table column.. I take all the distinct created-on column values from my table and use those values to create the week field which is linked to my time dimension. So when there is this date coming from one of the distinct table values the makeweekdate converts it to the above one as i explained. So in my combo box drop down it shows the week date as 2011-01-03 for the table date 2010-01-03. Although it doesn't effect my display values and the application functions OK it just looks Odd. I have to write a if condition for grouping this date in 2009-12-28 week. i.e I am hard coding my script for this test. I don't want to hard code my script in general.
Thanks for your explanation.
So you're just trying to get the first day of the week? That's the weekstart() function if so.
That's correct. Thanks.