Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 arethaking
		
			arethaking
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This is the code.
Please explain.
LET vTrendStart = '=Date(YearStart(Addmonths(Max(MonthYear), -12)), ' & chr(39) & 'MMMYY' & chr(39) & ')';
LET vTrendEnd = '=Date(MonthStart(Max({<_History = {1}>} MonthYear)), ' & chr(39) & 'MMMYY' & chr(39) & ')';
 trdandamudi
		
			trdandamudi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Chr(39) means single quote. If you use single quote directly in the LET statement it will not evaluate properly and that is the reason you use Chr(39). Hope this helps...
 trdandamudi
		
			trdandamudi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Chr(39) means single quote. If you use single quote directly in the LET statement it will not evaluate properly and that is the reason you use Chr(39). Hope this helps...
 arethaking
		
			arethaking
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks for the answer.could you explain how it will works for the above syntax.
 
					
				
		
 santiago_respan
		
			santiago_respanHi,
first of all it is good to know what the CHR function does... It returns the string character corresponding to its number.
Examples:
CHR(13) returns a carriage return
CHR(65) returns A (Capital A)
CHR(64) return @ (At simbol)
CHR(39) returns ' (single quote)
Character codes can be found in multiple sites (Example: http://www.asciitable.com/ )
And the reason why it is being used in that expression is that as you are trying to use single quotes insinde an expression already enclosed by single quotes, so the in the Let statement wont be evaluated properly.
Hope this helps.
Kind regards,
