User Tools

Site Tools


syntax:functions:right

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:right [2015/04/03 18:13] elenapsyntax:functions:right [2021/08/14 22:30] (current) – [Examples] craigt
Line 1: Line 1:
-===== Right(text, N) =====+====== Right(text, no_of_chars) =====
 +Category:  Text function
  
-Returns //N// right symbols of //text// where //N// is number.+\\  
 +=====Description===== 
 +This function returns the specified number of symbols from the right of //text// as text value.
  
-First argument is implicitly converted into text, if required.+\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|text|Text|The text value to extract the symbols from.| 
 +|no_of_chars|Integerminimum of 0|The number of symbols returned from the right side of the //text// argument.|
  
-^  Example  ^  Result +**Return value type:** Text
-|  right('(555)-555-5555', 8)  |  555-5555 +
-|  right('Consumer Products', 8)  |  Products  |+
  
-**See also** +\\  
-  * [[syntax:functions:left]] +=====Remarks===== 
-  * [[syntax:functions:mid]]+Regardless of the type of value passed in for //text//, the result of this function is //always// a text value. 
 + 
 +Entering a //no_of_chars// of 0 will return an empty value.  Entering a //no_of_chars// greater than the length of //text// will result in the full //text// value being returned. 
 + 
 +Numbers and equations can be used as the //text// argument and are implicitly converted to their text-equivalent.  When passing in an equation for //text//, //no_of_chars// number of symbols from the equation's //result// will be returned. 
 + 
 +Passing in a date value (#yyyy-MM-dd) will return //no_of_chars// number of symbols from the converted date serial value.  See the examples below. 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  right('Los Angeles', 3) //Returns 'les' 
 + 
 +  right('IT services', 8) //Returns 'services' 
 + 
 +  right('Canada',10) //Returns 'Canada' 
 + 
 +  right('EasyMorph',0) //Returns ''  (Empty value) 
 + 
 +  right(12345, 3) //Returns '345'  (Note, the numeric value of 12345 was passed in.  The result is a text value.) 
 + 
 +  right(#2021-10-21, 3) //Returns '490'  (2021-10-21 is 44490 as a date serial value, so '490' is returned.) 
 + 
 +  right(100*3, 1) //Returns '0'  (The result of 100 3 = 300, so '0' is returned as the rightmost character.) 
 + 
 +\\  
 +===== See also ===== 
 +  * [[syntax:functions:left|Left(text, no_of_chars)]] 
 +  * [[syntax:functions:mid|Mid(text, N, K)]]
syntax/functions/right.1428099220.txt.gz · Last modified: 2015/04/03 18:13 by elenap

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki