Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 dan_swanda_imc
		
			dan_swanda_imc
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
 nagaiank
		
			nagaiank
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 
					
				
		
 nagaiank
		
			nagaiank
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			dan_swanda_imc
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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!
