Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dan_swanda_imc
Contributor
Contributor

Weekday value inconsistent between desktop and QV Server

Hi Community,

Running into an annoyance with the Weekday() function that I'm hoping someone can help solve.  When I execute WeekDay('8/1/2016') on my PC, the resulting numeric value is 1.  However, when I run the same command on the QV server, the numeric result is 0.  The text value is "Mon" for both PC and Server.  But for some reason, the numeric values differ...

Here is the script I'm executing on PC and QlikView server:

tblWeekDay:

  LOAD

  '8/1/2016'                                  AS Date_

  , NUM(WeekDay('8/1/2016'))      AS WeekDayNum_

  , WeekDay('8/1/2016')                AS WeekDay_

  AUTOGENERATE 1;

Is there a setting that I'm overlooking that controls the default numeric value returned by WeekDay()?

Thanks,
Dan

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

Check the value set to FirstWeekDay in the script editor.

If it is set to 6, NUM(WeekDay('8/1/2016'))  will return 1.

If set to 0, you will get 0.

Hope this helps.

View solution in original post

2 Replies
nagaiank
Specialist III
Specialist III

Check the value set to FirstWeekDay in the script editor.

If it is set to 6, NUM(WeekDay('8/1/2016'))  will return 1.

If set to 0, you will get 0.

Hope this helps.

dan_swanda_imc
Contributor
Contributor
Author

Interesting - the script didn't contain the FirstWeekDay value in either case.  That being said, I included and set the value accordingly and the results are the same on both machines. 

Thanks for the help Nagaian - much appreciated!