Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 danielnevitt
		
			danielnevitt
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I have two date fields:
Mat_Year = format YYYY
Mat_Month = format MM
Please can someone help me to join these fields together to create a field in the format MMM-YY.
Thanks,
Daniel
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this
Date(Date#(Mat_Year&'-'&Mat_Month, 'YYYY-MM'), 'MMM-YY') as Mat_MonthYear
 kfoudhaily
		
			kfoudhaily
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hello,
in the loading script, in the same table where you are loading these two fields you may add the flowing statement:
date#(Mat_Month&'/'&Mat_Year,'MM/YYYY') as Date
fonction date# to force qlik to read the field as a date and not a string;
regards,
 danielnevitt
		
			danielnevitt
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Sunny,
That works great, thanks for your help.
The only issue I have is that the format is Mmm-YY (Jan-18) rather than MMM-YY (JAN-18).
Is it possible for the output to be in format MMM-YY
Regards,
Daniel
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sure.... all you need to do is to change your environmental variable from
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
to
SET MonthNames='JAN;FEB;MAR;APR;MAY;JUN;JUL;AUG;SEP;OCT;NOV;DEC';
