Getting left and right expression values

Kenneth Brody kenbrody at spamcop.net
Tue Apr 24 10:37:40 PDT 2012


(Top-posting fixed.)

On 4/24/2012 1:17 PM, Stanley - stanlyn-com wrote:
[...]
>> "left()" is simply "mid()" starting at position 1.
>>
>> "right()" is a smidge more involved, but you can use len() to get the
>> length of the field, and use length-n as the mid() starting position to
>> get the rightmost "n" characters.
[...]
> Also Chris, here we have been talking about date and time values, but
> there are many other places that this right() function stuff could
> really be your friend.  I too did not see it way back when I was doing
> only fp. It was only when the other languages introduced them to me that
> I say a much bigger picture.
[...]

As I stated above:

To get the left-most "Num" characters from field "Field":

     mid(Field,"1",Num)

To get the right-most "Num" characters from field "Field":

     mid(Field,len(Field)-Num,Num)

-- 
Kenneth Brody


More information about the Filepro-list mailing list