Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Is there A known bug on the WEEK() function?

QV_Ver.PNG.png

In a Text Object expression:

= 'Week(MakeDate(2000,1))=' & Week(MakeDate(2000,1)) & Chr(10)

& 'Week(MakeDate(2001,1))=' & Week(MakeDate(2001,1)) & Chr(10)

& 'Week(MakeDate(2002,1))=' & Week(MakeDate(2002,1)) & Chr(10)

& 'Week(MakeDate(2003,1))=' & Week(MakeDate(2003,1)) & Chr(10)

& 'Week(MakeDate(2004,1))=' & Week(MakeDate(2004,1)) & Chr(10)

& 'Week(MakeDate(2005,1))=' & Week(MakeDate(2005,1)) & Chr(10)

& 'Week(MakeDate(2006,1))=' & Week(MakeDate(2006,1)) & Chr(10)

& 'Week(MakeDate(2007,1))=' & Week(MakeDate(2007,1)) & Chr(10)

& 'Week(MakeDate(2008,1))=' & Week(MakeDate(2008,1)) & Chr(10)

& 'Week(MakeDate(2009,1))=' & Week(MakeDate(2009,1)) & Chr(10)

& 'Week(MakeDate(2010,1))=' & Week(MakeDate(2010,1)) & Chr(10)

& 'Week(MakeDate(2011,1))=' & Week(MakeDate(2011,1)) & Chr(10)

& 'Week(MakeDate(2012,1))=' & Week(MakeDate(2012,1)) & Chr(10)

& 'Week(MakeDate(2013,1))=' & Week(MakeDate(2013,1)) & Chr(10)

& 'Week(MakeDate(2014,1))=' & Week(MakeDate(2014,1)) & Chr(10)

& 'Week(MakeDate(2015,1))=' & Week(MakeDate(2015,1)) & Chr(10)

& 'Week(MakeDate(2016,1))=' & Week(MakeDate(2016,1)) & Chr(10)

& 'Week(MakeDate(2017,1))=' & Week(MakeDate(2017,1)) & Chr(10)

& 'Week(MakeDate(2018,1))=' & Week(MakeDate(2018,1)) & Chr(10)

& 'Week(MakeDate(2019,1))=' & Week(MakeDate(2019,1)) & Chr(10)

Results:

QV_Ver.PNG.png

Tags (4)
1 Solution

Accepted Solutions

Re: Is there A known bug on the WEEK() function?

Qlikview follows the ISO 8601 date standard:

If 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in week 01. If 1 January is on a Friday, Saturday or Sunday, it is in week 52 or 53 of the previous year (there is no week 00). 28 December is always in the last week of its year.

So, not a bug.


talk is cheap, supply exceeds demand
4 Replies
MVP
MVP

Re: Is there A known bug on the WEEK() function?

It's not a bug. QlikView uses ISO week numbering (widely used e.g. in Europe).

Re: Is there A known bug on the WEEK() function?

Qlikview follows the ISO 8601 date standard:

If 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in week 01. If 1 January is on a Friday, Saturday or Sunday, it is in week 52 or 53 of the previous year (there is no week 00). 28 December is always in the last week of its year.

So, not a bug.


talk is cheap, supply exceeds demand
Not applicable

Re: Is there A known bug on the WEEK() function?

Thanks!

MVP
MVP

Re: Is there A known bug on the WEEK() function?

Community Browser