Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 jaymerry
		
			jaymerry
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello all,
I'm trying to convert year in "YY" format to "YYYY" format in my script, but it doesn't seem possible.
Have you any ideas ?
Thanks for your help,
Jaymerry
 
					
				
		
 jaymerry
		
			jaymerry
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi all,
Thanks to your answers I have found the following script (file name : "xxxx-MMYY.xslx":
date
(date#(left(right(filename(),7),2), 'YY'),'YYYY')&left(right(filename(),9),2) as YYYYMM
Thanks for your help,
Jaymerry
 
					
				
		
Hi,
Your date format is having year in YYYY format then you have to just write Year(Date).
Regards,
Ravi
 
					
				
		
It will be:
=date(date#(Year, 'YY'),'YYYY')
(Where field Year is in YY format)
 
					
				
		
 jaymerry
		
			jaymerry
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Ravi,
I have a date from a filename with this format 'MMYY' and I try to have 'YYYYMM'.
It's not really a problem for the month (left function) but for the year, I don'treally know how to do.
Thanks for your help,
Jaymerry
 
					
				
		
 jaymerry
		
			jaymerry
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi all,
Thanks to your answers I have found the following script (file name : "xxxx-MMYY.xslx":
date
(date#(left(right(filename(),7),2), 'YY'),'YYYY')&left(right(filename(),9),2) as YYYYMM
Thanks for your help,
Jaymerry
 
					
				
		
Techically it is the same date(date#()). In your case, a more effective way (at least shorter and clearer) is:
date(date#(right(filename(),4),'MMYY'),'YYYYMM')
