Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 bobbydave
		
			bobbydave
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I've a number of dates that I want to look like
201509
201508
.
.
.
201008 etc
The date right now looks like e.g. 15/12/2015 (European format).
I would like it to look like above so I've gotten so far.
=right(purgechar(Calls.Date,'/'),6)
will give me 122015
now I want to get it to look like 201512
I could get both values but how do I reverse concatenate?
right(right(purgechar(Calls.Date,'/'),6) ,2) gives me 12
left(right(purgechar(Calls.Date,'/'),6) ,4) gives me 2015
but how do I reverse it so the 2015 comes out first and then the 12???
Thanks in advance.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sample script:
Table:
LOAD DateField,
Date(Date#(DateField, 'DD/MM/YYYY'), 'YYYYMM') as NewDateField;
LOAD Date(Today() + RecNo()) as DateField
AutoGenerate 365;
Output:
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this:
Date(Date#(DateField, 'DD/MM/YYYY'), 'YYYYMM') as DateField
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try
Date(date#(yourdate,'DD/MM/YYYY'),'YYYYMM')
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sample script:
Table:
LOAD DateField,
Date(Date#(DateField, 'DD/MM/YYYY'), 'YYYYMM') as NewDateField;
LOAD Date(Today() + RecNo()) as DateField
AutoGenerate 365;
Output:
 
					
				
		
 sunilkumarqv
		
			sunilkumarqv
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		SET DateFormat='M/D/YYYY';
change to
SET DateFormat='YYYYMD';
or
=SubField(Date,'/',3)&''&SubField(Date,'/',2)&''&SubField(Date,'/',1)
 qlikviewwizard
		
			qlikviewwizard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Try Like this:
SET DateFormat='M/D/YYYY';
Data:
LOAD *,Date(Date#(DATE_VALUE, 'DD/MM/YYYY'), 'YYYYMM')as DATE_VALUE_Target INLINE
[DATE_VALUE
25/12/2015
15/11/2015
5/10/2015
25/12/2014
15/11/2014
5/10/2014
]
 bobbydave
		
			bobbydave
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Everyone .... I cant believe I asked that question. I do apologise.
I was on holidays for two weeks and overcomplicated something so simple.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It happens to all of us 
But I am glad, all of us were able to quickly help you out.
Best,
Sunny
 qlikviewwizard
		
			qlikviewwizard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi, BobbyDave,
It is a learning dude. 
