Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 paulyeo11
		
			paulyeo11
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi All
I have below script :-
| Date(Monthstart([TempDate]), 'DD-MMM-YY') | as YearMonthDay, | 
I get number instead of date . So i think if i change the above script to Dual , it should help.
Paul
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Date function is dual in nature. If you are using Date function, I don't see why you are not seeing Date (and seeing Numbers)
 satishkurra
		
			satishkurra
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Get the YearMonthDay on to the presentation layer, right click go to number tab and check docuemnt overide settings and select date and specify the desired format.
Thanks
 
					
				
		
 paulyeo11
		
			paulyeo11
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Satish
I am using QS. it does not allow change.
Paul
 
					
				
		
 paulyeo11
		
			paulyeo11
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Sunny
Below script i also encounter the same problem , in QS it display number.
Date(Monthstart([TempDate]), 'YY MMM') as YearMonth,
After i change to below :-
Dual(Date(Monthstart([TempDate]), 'YY MMM'), MonthStart(TempDate)) as YearMonth,
it work fine in QS.
Paul
 satishkurra
		
			satishkurra
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Ok sorry as the discussion is posted in Qlikview
For Qliksense
Go back to script window and use Date conversion function as
Date(Date#(TransDate,'M/D/YYYY')) as TransDate
You should get now
Thanks
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		That is very strange and seems like a bug to me.
 
					
				
		
 paulyeo11
		
			paulyeo11
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Satish ,
I have try your proposal , it still the same , it return number.
All below work fine in QS :-
Dual(Date(Monthstart([TempDate]), 'YY MMM'), MonthStart(TempDate)) as YearMonth,
Dual('W ' & text(1+ceil((TempDate-floor(weekend(monthstart(TempDate))))/7)) & text(date(TempDate,' MMM YY')),weekstart(TempDate)) as YearMonthWeek,
Right(year(TempDate),2) as YEAR_,
year(TempDate) as [Year],
Y AS year,
But below not working , as return number :-
Date(Monthstart([TempDate]), 'DD-MMM-YY') as YearMonthDay, // return number
Date(Date#([TempDate],'M/D/YYYY')) as YearMonthDay, // return number
My conclusion is if can make above script starting with Dual or Text or Right it should be okay.
Paul
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Please post sample data..
 
					
				
		
 paulyeo11
		
			paulyeo11
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Sasi
Thank you for interested to look into my case, enclosed pls find QV chart is okay , but when use in QS is not okay
