Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
t_chetirbok
Creator III
Creator III

QV doesn't display week in ISO format

Hello,

As I know QV uses ISO format  of weeks.

But now I have a problem that week(today()) returns 52, but it should be 51.

Of course I can add FirstWeekDay, BrokenWeeks, ReferenceDay. But that is not a solution.

Do you know why I have this strange behavior?

Thanks,

Tatiana

1 Solution

Accepted Solutions
t_chetirbok
Creator III
Creator III
Author

The result of Week() function is affected by 3 environment variables: FirstWeekDay, BrokenWeeks and ReferenceDay, which are set in the beginning of a reload script.


In QV12 by default we have those variables in the beginning of a reload script.

In QV11 we don't have it.


So, make sure that you set  FirstWeekDay = 0, BrokenWeeks = 0 and ReferenceDay = 4, to have ISO format

View solution in original post

13 Replies
upaliwije
Creator II
Creator II

Sorry I have no idea about this please

t_chetirbok
Creator III
Creator III
Author

hmm,

Did you post this reply only for getting one point?

upaliwije
Creator II
Creator II

Hi

Please don't think that way. If I wanted to collect points as you suggested I could have collected  a lot of points by now. In fact I replied because your post had a mail in my inbox

tamilarasu
Champion
Champion

Hi Tatsiana,

I am using QV 12.10 (tested in 12.10 SR7 as well) and the result is 51.

Capture.PNG

t_chetirbok
Creator III
Creator III
Author

yeah, I am using the same version.

and my system time is correct

but in QV 52

tamilarasu
Champion
Champion

That's strange. I'm not sure about this behavior and I never faced this issue.

marcus_sommer‌ Hope you might have some answer for this behavior.

Anil_Babu_Samineni

I think, you will getting wrong even if you use WeekName(Today())

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
marcus_sommer

I assume it's a bug like mentioned here - please report it to Qlik that it could be fixed within one of the next releases. And for now as workaround you could try something like: subfield(weekname(today()), '/', 2):

- Marcus

tamilarasu
Champion
Champion

Yes. Weekname function is returning wrong result for me (however week function returns the correct week number).

Capture.PNG

Capture2.PNG

Capture3.PNG