Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 marksmunich
		
			marksmunich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Community,
I have a problem in my application with a field. The values in this field are uneven. how can i fix it. i want to make all the values in the format year_Month. below is the image.

Thanks
Mark
 Peter_Cammaert
		
			Peter_Cammaert
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Do you have 2 possible formats? Then, when loading the different date fields in your script, test for the presence of an underscore. If it isn't there, format the purely numerical value with date(date#(NumericalDateValue, 'YYYYMM01'), 'YYYY_MM') or something.
Peter
 
					
				
		
 sunilkumarqv
		
			sunilkumarqv
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try like this
Date(Date,'DD/MM/YYYY')
or
use in script
Set DataFormat='DD/MM/YYY'
 
					
				
		
 sivarajs
		
			sivarajs
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		purgechar(field,'_')
Use in script or list box expression
 maxgro
		
			maxgro
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		if you have mixed format you can use the alt function
M:
LOAD YM, date(alt(date#(YM, 'YYYY_MM'), Date#(YM, 'YYYYMM')), 'YYYY_MM') as NewYM;
LOAD * INLINE [
YM
2014_01
2014_02
201403
201404
];
 
					
				
		
 er_mohit
		
			er_mohit
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this in script
date(Date#(PurgeChar(Datefield,'_'),'YYYYMM'),'YYYYMM') AS Date
or
date(PurgeChar(Datefield,'_'),'YYYYMM') AS Date
 
					
				
		
 preminqlik
		
			preminqlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi try this
date(date#(replace(TransDate,'_',null()),'YYYYMM'),'YYYYMM') as NEWDate
