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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
doherja
Creator
Creator

WeekStart() behavior changed suddenly

Hello, my QlikView app looks for a file whose name includes the date returned by :

Date(WeekStart(Today(),-1,6), 'YYYYMMDD')

Until recently, it opened the file named for the Monday of the previous week; now it looks for Sunday of the previous week.

  • The load script has not changed
  • DayNames is set within the app as 'Mon;Tue;Wed;Thu;Fri;Sat;Sun' and has not changed.  There is not an include file that could be overriding it.
  • We have not updated QlikView recently.
  • We have done a Windows update, though--that couldn't affect this, could it?

Thanks

Labels (1)
1 Reply
Happy_Mask_Salesman
Partner - Contributor III
Partner - Contributor III

I would look up if the FirstWeekDay variable has changed its value.

Usually it's on the variable declaration of the main tab.

You can also set it using:

SET FirstWeekDay=0;

This sets the first day of week on Monday. To be Sunday the first day of week, the value should be 6.

https://help.qlik.com/en-US/sense/August2023/Subsystems/Hub/Content/Sense_Hub/Scripting/NumberInterp...

If regional settings of the system has changed, I think there's a small chance that Qlik updated its regional features too, but you should have noticed it too by looking at thousand, decimal separators or date formats. I'm sorry but I am unable to confirm this.

 

PD: I noticed that the third parameter of WeekStart tells Qlik the first day of the week, remember, six is for sunday, zero is for monday.

https://help.qlik.com/en-US/qlikview/May2023/Subsystems/Client/Content/QV_QlikView/Scripting/DateAnd...

Watch out for this and check your formulas.

Regards,